

Chapter 9 Getting to know Math
Create formulas (comparisons) with LibreOffice

Documentation for LibreOffice is available at

ii . . Getting to know Math

This document is copyrighted © 2010 . About the LibreOffice Documentation team, whose contributors are listed below. Anyone may distribute and/or modify it in accordance with the conditions of GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or higher, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), version 4 or higher.
All trademarks in this guide are the property of the rightful owners.
Jean Hollis Weber Hazel Russman Laurent Balland-Poirier John A Smith Martin Saffron Peter Schofield Olivier Hallot
Please note that everything you send to a mailing list, including your email address and other personal information contained in the message, is publicly archived and cannot be deleted.
If you have comments or comments about the translations in Dutch, please visit the mailing list: .libreoffice.org
You can register via an email to discuss+subscribe@nl.libreoffice.org
This manual is based and updated on previous versions of this chapter. The employees are:
Daniel Carrera Agnes Belluzunce TJ Frazier Peter Kupfer Ian Laurenson Janet M. Swisser Jean Hollis Weber Michele Zarri
Additional material has been added from the German and French manual for Math (translated into English by Laurent Balland-Poirier and Hazel Russman). Contributors to these books are:
Regina Henschel Christian Kühl Florian Reisinger Gisbert Friege (Dmaths) Jochen Schiffers Regina Henschel Christian kühl florian reisingergisbert friege (dmath's) jochen sciffers fredéric parrenin
Publication date and software version.
Published February 27, 2016. Based on LibreOffice 5.0.
Meet Math . .
Kees Kriek · Translated May 2016

During the creation of this chapter, the small . . Tango icons set was used. The icons can be easily adjusted via Extra > Options... > LibreOffice >: View and then make your choice with Icon Size and Style.
Some keystrokes and menu items are different on Mac than in Windows and Linux. The table below gives some general replacements for the instructions in this chapter. For a more detailed list, please see the Help of this application.
Menu Selection Extra > Options LibreOffice >: Preferences Access to setting options
Control+click or right-click depending on the computer settings
Ctrl (Control) (Command) . . used with other keys
iv . . To get to know Math
Right click · Open context menu


vi . . Meet Math

Math is the component of LibreOffice to create and edit formulas (mathematical equations), in a symbolic form, within documents from Libreoffice or as separate objects. Example formulas are shown below. However, if you want to apply numerical values in formulas, check out the Manual for Calc for more information, because Math does not perform actual calculations.
dx = in (x) + tan
− 1 ( x
2 ) or
+ + OH −
NH3+H2O⇌NH4
The Formula Editor in Math uses a formatting language to display formulas. This layout language is designed to be easily legible wherever possible, e.g. a over b
returns the breakup ab when used in a formula.
With the Formula Editor you can create a formula as a separate document or as a file for a formula library or insert formulas directly into a LibreOffice Writer, Calc, Impress or Draw document.

Figure 1. An empty formula document in Math
Start . .

To create a formula as a separate document or file, use one of the following methods to open an empty formula document in Math (Figure 1):
When you use the format in your Formula Editor input, the formula will appear in the example window during and after entering the format language. The element panel on the left of the preview window can also appear, if selected by View on the Menu Bar. For more information on making formulas, see Making Formulas on page 9.
Formula file formats LibreOffice's own formula file format is ODF formula, with the extension *.odf. You can also embed formula objects in other documents, such as presentations, worksheets or text documents. LibreOffice can also read and write formulas in MathML 1.01 format, with the extension .mml.
LibreOffice Math can import MathML presentations directly from the clipboard. To import a formula from MathML presentation, copy the formula of the external formula editor and choose Extra > Import MathML from the clipboard. For example, the MathML code in the left column of Table 1 shows the equation in the right column.
To insert a formula into a LibreOffice document, open the document in Writer, Calc, Draw or Impress. The LibreOffice module you use affects how to position the cursor in order to insert the formula.
Then go to Insert > Object >: Formula on the Menu Bar in Formula Editor The Commission has already taken a decision on the matter. You can also go to Insert > Object >: OLE Object on the Menu Bar go to the dialog Insert OLE object The Commission has already taken a decision on the matter. Then select the option Create New, choose LibreOffice 5.1 formula in the list and click on OK in Formula Editor The Commission has already taken a decision on the matter. The Elements Panel left

of the Preview Window can also open, if selected by View on the Menu Bar. For more information on the creation of formulas, see Making Formulas on page 9.
Figure 2 shows an example document in Writer with the formula box selected, ready to enter a formula.

When you are done entering the format of the formula, please use Formula Editor close by on the Esc-click the key or, outside of the formula, click in an area of the document. Double-clicking on the formula object in the document will be the Formula Editor Reopen so you can edit the formula.
Formulas are inserted as OLE objects in documents. You can, as with any other OLE object, change how the object is placed in the document. For more information about OLE objects, see the manuals for Math, Writer, Calc, Draw and Impress.
If you need to insert formulas frequently in a document, perhaps you want the button Formula to the toolbar Default add or create a shortcut. See Chapter 14, Modify LibreOffice, for more information.
You can insert elements in a formula in one of the following ways:
Formulating . .

The Elements Window or using the context menus for inserting formulas provides a convenient way to learn the formatting language LibreOffice Math uses.
The Elements Window can be used easily for entering formula data. In addition to the list of categories, at the top of the window, it also provides an example category, which gives you examples for using as a starting point of your formula or comparison.
By default it is Elements Window Left of the Preview Window and the Formula- editor as in Figure 1 and Figure 2 is displayed. It can also be made floating, like other fixed windows.
The Formula Editor also provides a context menu, which gives access to symbols and categories, while creating a formula. Click with right on the Formula Editor to open the context menu. Select a category and then choose a format preview you want to use, in the sub-context menu. An example is shown in Diagram 3.


The Elements Window and the context menu only contain the most commonly used commands used in formulas. For some rarely used commands, you should always enter the task with the format language. See the Manual for Math for a complete list of assignments.
The language of preparation is directly used in the Formula Editor The Commission has not yet adopted a decision on the matter. For example, typing the formatting language 5 times 4 in Formula Editor makes a simple formula 5×4 . If you are experienced using the format language, it may be the quickest way to introduce a formula. Table 2 shows some examples of the formatting language to enter commands. For a complete list of contracts, which are listed in the Formula Editor can be used, see the Manual for Math.
a = b a = a sqrt {a}
a
2 a^2 a n a n ∫f xdx int f(x) dx .an sum a n
a × b a times b x . . y x cdot y
Formulating . . 11

Use the format language Greek characters are often used in formulas, but Greek characters cannot be inserted into a formula with the Elements Window or with the context menu. Use the English name of Greek characters in the format language when entering Greek characters into a formula. See Appendix A, Commands in Math, in the Manual for Math for a list of Greek characters, which can be used with the formatting language.
Icons dialog Greek characters can also be entered in a formula using the dialog box Icons
on the toolbar Extra to the dialog Icons to be opened (Diagram 4) 3) Select Greek in the drop-down list Symbol Set. Select Greek in the list of cursive characters. 4) Select the Greek character from the list of icons and click Insert. When a character is selected, the name of the Greek character is displayed under the icons list. 5) Click on Close when you have finished inserting Greek characters into the formula.

Figure 4. Icons dialog

The simple formula 5×4 can be made with LibreOffice Math as follows:
. . Select Unaire/Binaire operators in the list of options for use by Elements Window and then select the symbol Multiply
. . . Click with right in the Formula Editor and select Unaire/Binaire operators > a times b in the context menu.
appears in the document. The replacement characters must then be replaced by the real numbers. Using the format language, type 5 times 4 in Formula editor. The formula
appears directly in the document.
Press the key F4 to move forward from one replacement stitch to the next replacement character in a formula. Press Shift+F4 to go back from one replacement to the previous replacement in a formula.
If necessary, you can prevent the formula from being updated automatically. Go View on the Menu Bar and set the option Provided autom. refresh Out. To update the formula manually, press F9 or choose View > Update on the Menu Bar.
Example 2 You want to enter the formula π 3.14159, with the value of pi rounded to 5 decimal places. You know the name of the Greek sign (pi), but you do not know whether the pictogram haal in the format language corresponds to Is similar or equal.
. . . Click with right in Formula Editor and select Relationships > a simeq b in the context menu. 4) Remove the first replacement character before the word simeq in Formula Editor.
appears in the document.
Formulating . . 13

How to edit a formula and go to mode Edit depends on whether the formula is made in Math or in another module of LibreOffice.
1) In Math; double click on an element of the formula, which is in Preview Window appears to the formula element in Formula Editor select or select the element of the formula in Formula Editor. 2) In Writer, Calc, Impress or Draw; double-click the formula or right click on the formula and select Edit in the context menu to Formula Editor to open in mode Edit. The cursor is at the beginning of the formula in Formula Editor.
If you cannot select a formula element using the cursor, click on the icon Formula Cursor
on the toolbar Extra to activate the formula cursor.
3) Use one of the following ways to select the desired formula element: . . Click on the formula element in Preview Window, place the cursor at the beginning of the formula element in the Formula Editor and then select the formula element. . . Double-click the formula element in Preview Window The formula element in the Formula Editor select. . . Place the cursor in the Formula Editor on the formula element you want to edit and then select this formula element. . Double-click directly on the formula element in Formula Editor to select it. 4) Apply your changes to the formula element. 5) Go to View > Update on the Menu Bar, press F9 or click on the icon Update
on the toolbar Extra to the formula in Preview Window updating the document. 6) In Math, save your changes to the formula after editing. In Writer, Calc, Impress or Draw, click anywhere in your document, outside the formula, to mode Edit leave and then save the document to save your changes in the formula.
This section gives some advice on how to prepare complex formulas in Math or your LibreOffice document.
LibreOffice Math knows nothing about the sequence of execution within a formula. You must use braces to explicitly indicate the sequence of execution within a formula. The following examples show how accolades can be used in a formula.
2 over x + 1 gives as result 2 x +1
Example 1

Math recognized that the 2 before and x after, belongs to a fracture and presented them as such. If you want x+1 to be the denominator, instead of x, use accolades so that both are placed in there.
Add accolades to 2 over {x + 1} returns 2 x+1 where x+1 is the denominator.
. . 1 over 2 gives as result .
Math recognized the minus sign as a prefix for 1 and placed it in the numerator of the fracture. If you want the whole fraction to be negative, with the minus sign before the fracture, you need to set up a break between braces in order for Math to know that these characters belong together.
Adding accolades to the format language {1 over 2} results – 1
2 so that the whole
fracture is negative.
Example 3 When accolades are used in the format language, they are used to define the format of the formula and are not displayed or printed. If you want to use accolades in your formula, use the commands lbrace and rbrace in the format language.
x over {at .x + 1} returns x . . x+1
Replace the braces with the commands lbrace and rbrace in the format language. Write it as x
about lbrace . . x + 1 rbrace and the result is x {– x+1}
If you want to use a matrix in your formula, you must use the command matrix. For example,
matrix {a #b ## c #d } gives the result of the matrix a b c d in the formula, where rows
are separated by two gates (#) and items within each row are separated with one gate (#).
When using brackets in a matrix, the brackets are not normally scaled if the size of the matrix increases. For example, (matrix {a #b ##c #d }) returns as
result (a b c d)
To solve this problem, LibreOffice Math supplies scalable brackets that increase in size so they fit the dimensions of the matrix. The left (and right) commands should be used to create scalable brackets in a matrix. For example, left( matrix
{a #b ## c #d } right) gives as result (
By the way, it's surrounded.
Scalable brackets can be used in any element in a formula, such as a fraction, square root.
Formula layout .
Example 2

Use the left[ and right] commands to get scalable square brackets. A list of all available brackets in Math can be found in Appendix A, Commands in Math, in the Manual for Math.
If you want all brackets to be scalable, go to Format > Distance to the dialog Spacing The Commission has already taken a decision on the matter. Click on Category, select Brackets in the dropdown and select the option All brackets on scale The Commission has already taken a number of decisions.
When you use brackets in a formula, Math expects to close a hook for each hook opening. If you forget to add a hook, Math places an inverted question mark next to the place where the hook should be closed. This reverse question mark disappears when all the brackets are combined. A single hook is sometimes necessary and you have the following options.
Non-scale brackets A backslash \ is placed in front of a non-scalable hook to indicate that the next character should not be considered as a hook, but as a character.
For example, the single brackets in the formula [ a; b [ are intentional but gives as
¿ a;b ¿
. To remove the reverse question marks and single brackets
backslashes are added. The formula then becomes \ [ a; b \[and the result
[a; b[ shows single brackets without the reverse question marks.
Scalable brackets To make single scalable brackets or accolades in a formula, the layout commands left, right and none are used.
x for x≥0 −x for x
> 0 # -x "for" x < 0 in the Formula Editor.
¿ x for x≥0 −x for x
This, however, gives the incorrect result
|¿|x ¿
To remove the reverse question marks and make the right formula, you need to use the formatting commands left, right and none. Change the formula into Formula Editor in abs x = left lbrace stack {x "for" x >= 0 # -x " for" x < 0} right none and this makes the correct formula.
result · ¿ · Preview

In Math's basic installation functions are displayed in italic characters and variables. However, if Math does not recognize a function, you can tell Math that you have just entered a feature. Enter the formatting command func before a function to force Math to recognize the feature and use normal characters.
For a complete list of functions, see the Manual for Math.
Some functions in Math must be followed by a number or variable. If these are missing, Math puts an inverse question mark where the missing number or variable should be. To remove this inverse question mark and correct the formula, enter a number, variable or few empty brackets as replacement.
You can navigate through errors in a formula with F3 and Shift+F3.
Suppose you want to make a formula of more than one line, for example: x=3
y=1 and your first reaction
would normally be to just get on the Enter- press the button. If you are on the Enter- press the key, enter the formatting language in Formula Editor to a new rule, but the resulting formula does not contain two lines. You need to explicitly type the macro command newline, each time you want to create and display a new line in a formula.
Preview x = 3 y = 1 gives the incorrect result x=3 y=1
x = 3 newline y = 1 gives the right result x=3
It is not possible to create multiline formulas in Math, if a line ends with an equal-to-sign and you want to continue the calculation on a new line without finishing the sum with the item on the right side of the equal-by-sign. If you need a multi-line formula, which has an equal-to-one sign at the end of the line, use empty quotes . ., empty accolades {} or the characters accent grave . or tilde .
By default, the alignment of a formula, with multiple lines, is centered. For more information on alignment when using an equal sign, see the Manual for Math.
Space between elements in a formula cannot be obtained with spaces in the format language. If you want spaces in a formula, use one of the following options:
Each space at the end of a line in the format language will be ignored by default. For more information, see the Manual for Math.
Formula layout .
y=1

The sum and integral commands can include the parameters from and to, if you want to set the lower and/or upper limit respectively. The parameters from and to can be used alone or together, as shown in the following examples. For more information about the Sum and Integral commands, see Manual for Math.
int from 0 to x f(t) dt gives the result ∫
f (t)dt
f (t)dt
sum to infinity 2^{-n} returns as result .
Writing derivatives
When you write distractions, tell Math it's a breach by using the command over. The command over is combined with the character d for a complete distraction or the partial assignment to get the effect of derivative. Accolades {} are used on both sides of the element, to close and create the distraction as shown in the following examples.
{df} over {Dx} returns as result df
{partial f} over {partal y} returns as a result . ♪f
2f ∂t
{partial^2 f} over {partal t^2} gives as result . ♪
To write prime number function names, as is customary in school notation, you must first add the symbols to the catalogue. See the Manual for Math for more information.
Signs used to manage the format language cannot be accessed directly as normal characters. The characters concerned are: %, {, }, &, . For example, you cannot write 2% = 0.02 or 1" = 2.54 cm in the format language and expect that same characters will appear in the formula. Use one of the following methods:

The dialog Special characters, which is used by other modules of LibreOffice, is not available in Math. If you need special characters regularly, they should be included in Math's catalogue, see the Manual for Math for more information.
To include text in a formula you will need to enclose it between double quotes, for example x " for " x > 0 in format language the formula
The Commission has already taken a decision on this matter. All characters, except double quotes, can be used in the text. However, if you need double quotes in formula text, you will have to create the text with duplicate quotation marks in LibreOffice Writer and then put them into the formula using copying and paste as in Diagram 5 is shown.
The font used in a formula is the default font that appears in the dialog Fonts is set. For more information on changing fonts used in formulas, see Adjust the presentation of formulas on page 20.
By default, text is aligned in formulas left. To change the alignment of text, see Adjust the alignment of formulas on page 24.
Format commands are not interpreted in text, which is used in formulas. If you want to use text formatting commands in a formula, then please insert the text into the Formula Editor Separating with double quotes.

Formula layout .

Preview The following should be inserted into the Formula Editor:
"In color blue bold "like-legged" triangles the base angles are equal"
writes the following text formula
LibreOffice Math has no command to align formulas on a particular character. However, you can use a matrix to align formulas on a character and this sign is normally the equal-to-sign (=).
Make the matrix:
matrix{ alignr x+y # {}={} # alignl 2 ## aligrnr x # }= {{} / # aignl 2-y }
gives the following result, in which formulas are aligned to the equal-to-sign.
x+ y = 2 x = 2−y
The low accolades on each side of the is-equal-to-sign are necessary, because it is-like-to sign a binary operator and therefore requires an expression on each end. You can use spaces or . . or ~ characters on either side of the is-equal sign, but accolades are recommended because they are easier to see in the format language.
You can reduce the distance on each side of the equal-to-sign if you change column space from the matrix. See Adjust spaces in formulas on page 19 for information on adjusting distances in formulas.
Current font size of formulas To change the font size of a formula, which has already been inserted in Math or another module of LibreOffice:
Preview Default font size 12pt:
Preview

After changing the font size to 18pt:

Default font size of formulas To set the default font size, used for all formulas in Math or another LibreOffice module:
1) Before inserting a formula into your document, go to Format > Font Size on the Menu Bar to the dialog Font size to be opened (Diagram 6). 2) Choose another font size by increasing or lowering the number of points behind Basic Size or to type a new value in it. 3) Click on Default and attach your changes to the base font size. All formulas that will be made from now on will use the new basic font size for formulas. 4) Click on OK to save your changes and the dialog Font size to be closed.
If you have already inserted formulas into your document and changed the default font size, only formulas that are inserted after the change will use new default settings. You need to manually adjust the font size of already inserted formulas, if you want these formulas to use the same font sizes as default settings. For more information on changing the font size, see Manual for Math.
Current font for formulas To change the font used for the current formula in Math or another module of LibreOffice:
Adjust the presentation of formulas . .


Standard fonts for formulas To change the default fonts used for all formulas, in Math or another module of LibreOffice:
1) Before inserting formulas, go to Format > Fonts on the Menu Bar to the dialog Fonts to be opened (Diagram 7). 2) Choose a new font, for each of the options, in the drop-down lists. 3) If the desired font is not in the drop-down list, click on Change and choose the option in the context menu to create a dialog Fonts The Commission has already taken a decision on the matter. Select the desired font and click on OK to add it to the list of options for that option. 4) Click on Default and attach your changes to the fonts. All formulas that are made from now on will use the new basic fonts for formulas. 5) Click on OK to save your changes and the dialog Fonts to be closed.
If you have already inserted formulas into your document and change the default fonts, only formulas that are inserted after the modification will use the new default settings. You need to manually adjust the font size of already inserted formulas, if you want these formulas to use the same fonts as default settings. For more information on how to change the fonts, see Manual for Math.
Use the dialog box Spacing (Diagram 8) to determine the space between the formula elements. The space between the two is specified as a percentage of the defined base size for font sizes.

Current gap for formulas To change the default space used for all formulas, in Math or another module of LibreOffice:
1) Click in the format language Formula Editor. 2) Go to Format > Distance on the Menu Bar to the dialog Spacing to be opened (Diagram 8). 3) Click on Category and choose one of the options in the dropdown list. The options in the dialog Spacing change according to the category chosen. 4) Enter new values for the category spaces and click OK. 5) Check the result in your formula. If you are not satisfied, repeat the above steps.

Standard formula distances To change the standard distances for all formulas in Math or another module of LibreOffice:
1) Before inserting a formula into your document, go to Format > Distance on the Menu Bar to the dialog Spacing to be opened (Diagram 8). 2) Click on Category and choose one of the options in the dropdown list. The options in the dialog Spacing change according to the category chosen. 3) Click on Default and confirm your changes in the spaces for formulas. All the formulas that are made from now on will use new spaces. 4) Click on OK to save your changes and the dialog Spacing to be closed.
If you have already inserted formulas into your document and changed the space between them, only those formulae that after the change in the spaces will use the new settings. You need to manually change the spaces of already entered formulas if you want these formulae to use the same space as default settings. For more information on changing the spaces of formulas, see Manual for Math.
Adjust the presentation of formulas . .

Alignment settings determine how your formula elements are aligned horizontally above each other.
It is not possible to align formulas with a given character and the alignment of formulae is not applied to text elements. Text elements are always aligned to the left.
Independent of the use of alignment of the formula described below, it is possible to align formulas with alignl, aligngc and alignr commands. These commands also work for text elements.
Current Formula Alignment To modify the alignment of a formula in Math or another module from LibreOffice:

Standard formula alignment To change the default alignment of a formula in Math or another module from LibreOffice:
1) Before inserting a formula into your document, go to Format > Alignment on the Menu Bar to the dialog Alignment to be opened (Diagram 9). 2) Select Left, Centered or Right for horizontal alignment. 3) Click on Default and confirm your changes to the alignment for formulas. All the formulas that are made from now on will use the new alignment. 4) Click on OK and check the result in your formula. If you are not satisfied, repeat the above steps.

If you have already inserted formulas into your document and changed the alignment, only the formulae that were introduced after the modification in the alignment will use the new settings. You need to manually change the alignment of already entered formulas if you want these formulas to use the same alignment as default settings.
Character color The colour used in a formula for the characters is changed with the color command in the format language. This command only works on the formula element directly after the command with the name of the color. For example, the formatting color red ABC 5 times 4 enter, gives as result ABC 5×4 .
To change the color for the entire formula, you need to put the whole formula in brackets. For example, enter the formatting color red {ABC 5 times 4}, giving as result
ABC 5×4 .
For information on available colours, see the Manual for Math.
For ease of use, it has Elements Window category Attributes, which contains a list of standard colors. Click on the desired color to insert the command in your formula.
Background color It is not possible to select a background color for formulas in LibreOffice Math. The background color for formulas is by default the same colour as the frame of the document, where the formula was inserted. However, in LibreOffice documents you can use object properties to change the background color of a formula. More information about the use of background colors (flat fill for objects) of a formula can be found in the manuals for Writer, Calc, Draw and Impress.
If you regularly insert the same formulas into your documents, you can create a formula library with the formulas that you use to Formula Editor The Commission has already taken a number of decisions. Individual formulas can be stored as separate files, using the ODF format for formulas, with the addition .odf or in MathML formatting with the add-on .mml.
You can use LibreOffice Math, Writer, Calc, Draw or Impress to create formulas and fill your Formula Library.
Adjust the presentation of formulas . .

The Formula Editor. See A formula as separate document or file on page 7 for more information. 3) Go to File > Save As on the Menu Bar or use the key combination Ctrl+Shift+S to the dialog Save As The Commission has already taken a decision on the matter. 4) Navigate to the folder you created for your formula library. 5) Type a recognizable name for your formula in the box Name. 6) Choose ODF Formula (.odf) or MathML 1.01 (.mml) file type from the dropdown list for your formula. 7) Click on Save to save your formula and the dialog Save As to be closed.
1) Create a folder on your computer to save your formulas and give this directory a recognizable name, for example Formula Library. 2) Open a document with Writer, Calc, Draw or Impress. 3) Go to Insert > Object >: Formula on the Menu Bar in Formula Editor open and make your formula. See A formula in LibreOffice documents on page 8 for more information. 4) Right click on the object of the formula and choose Save Copy As in the context menu to dialog Save As The Commission has already taken a decision on the matter. 5) Navigate to the folder you created for your formula library. 6) Type a recognizable name for your formula in the box Name. 7) Choose file types or ODF Formula (.odf) or MathML 1.01 (.mml) as a file type for your formula. 8) Click on Save to save your formula and the dialog Save As to be closed.
Use your formula library You cannot insert, drag and drop a formula in your document from your Formula library or with Insert > File on the Menu Bar. You must insert the formula from your library as OLE object.
1) Open the document in Writer, Calc, Draw or Impress. 2) Go to Insert > Object >: OLE object on the Menu Bar to the dialog Insert OLE object The Commission has already taken a decision on the matter. 3) Select the option Create Out of File. 4) Click on Search to open a file browser. 5) Navigate to the folder you created for your formula library. 6) Select the desired formula and click Open or double-click the formula you want to insert. 7) Click on OK to insert the formula as an OLE object in the document and dialog Insert OLE object to be closed.
When a formula is inserted into a document, LibreOffice Writer inserts the formula in a frame and treats it as an OLE object. Double-clicking on an inserted formula will Formula Editor open in LibreOffice Math, where you can edit the formula.

This section describes the options you can customize for each individual formula in a document from Writer. View the chapter on layout profiles in the Manual for Writer for more information on how to adjust the default settings of OLE objects.
Automatic numbering of referral formulas can only be performed in LibreOffice Writer.
ABC 5×4 (1) 3) Remove the example formula and insert your formula as an object in the left column. See Making Formulas on page 9 for more information on the insertion of formulas.
You can also insert your formula in the document first and then run steps 1 and 2, to replace the example formula with your formula.
If you want to use square instead of round brackets to the formula number or if you want the formula numbers from the formula separated with tabs rather than using a table, then you need AutoText item for fn change. View the section on AutoText in Chapter 4, Get to know Writer.
1) Click in the document where you want to place the cross reference. 2) Go to Insert > Cross reference on the Menu Bar to the dialog Fields to be opened (Diagram 10). 3) Click on the tab Cross references and select Text in the section Type. 4) Select, in the section Selection, the number of the formula to be referred to. 5) Click in the section Insert a reference on Reference and click on Insert. 6) When you are done making cross references, click Close to close the dialog.
To enter a cross-reference without brackets, choose Numbering for Reference, in the part Enter a reference.
Formulas in Writer .


A formula is treated as an object within Writer and the default anchor in a paragraph is As a sign, if inserted in a document. To modify the anchorage of a formula object:
Alternatively,


The anchor options are not available in the dialog Object, when you apply changes to the different options available for frame format profiles. For more information on customizing frame layout profiles, please see the chapter about formatting profiles in the Manual for Writer.
The normal default vertical alignment settings for formula objects is to use the text line as a reference. This default setting can be changed by adjusting the frame format profile for formulas, see chapter on layout profiles in the Manual for Writer for more information.
To adjust the vertical alignment of an individual formula object:
1) Right click on the selected formula object and choose Object in the context menu or go to Format > Frame/Object to the dialog Object to be opened (Diagram 11). 2) Select the tab Type and choose a new alignment in the dropdown list of the section Position. The options for vertical alignment are Top, Downstairs, Bottom Centered, From above and Vanaf under. 3) Enter a positive or negative value for vertical alignment in the text box if necessary. This option is only available if the vertical alignment From below is selected.
Formulas in Writer .


If the part Position of the dialog box Object greyed out and unavailable, go to Extra > Options >: LibreOffice Writer > and set the option Alignment on Base Math Out. This setting is stored with the document and applied to all formulas in it. Each new document will also use this setting for the alignment of Math's baseline.
If a formula object is inserted into a Writer document, it has space on each side. The default distance value is set in the frame format profile for formula objects and can be modified by the formula format profile, see chapter on layout profiles in the Manual for Writer for more information.
You can change the distance for each formula object in your document individually as follows:

In large formulas, which are placed in a text line, the formula elements often exceed the text height. To make large formulas more readable, it is therefore recommended to always place large formulae in separate paragraph dynamometers.
However, if it is necessary to put a large formula in a text line, double-click the formula to Formula Editor open and then go to Format > Text mode on the Menu Bar. The Formula Editor will try to narrow the formula to match text height. The counters and the denominators of a fraction have shrunk, and the boundaries of integrals and sum are placed next to the integral/sum sign as shown in the following example.
Preview A formula as a separate paragraph:
and the same formula embedded in a text line with the formatting of Formula Editor: ∑i=2
The default setting for background (flat fill) and edges for formula objects is set in the frame format profile. To adjust this default frame format profile setting for formulas, please see the chapter on layout profiles in the Manual for Writer. For individual formulas in your document, however, you can change the background and edges.
The dimensions of a frame that contains a formula in your document cannot be changed. The size of a frame for a formula object depends on the setting of the font size of the formula; see Manual for Math for more information.
1) Select the formula in your document you want to change the background. 2) Right click on the selected formula object and choose Object in the context menu or go to Format > Frame/Object to the dialog Object The Commission has already taken a decision on the matter. 3) Click on the tab Area and select the type of filling you want to use for your formula in the dropdown list Fill (Figure 13). 4) Select the desired options for the background of the formula. Change the options depending on the type Fill which you select. 5) Click on OK to save your changes and the dialog Object to be closed.
Formulas in Writer .
i=2




To quickly insert a formula into a Writer document, which you know the format language without Formula Editor to open:
If the icon Formula not shown on the toolbar Default, then right click on an empty place of the toolbar, select Visible Buttons in the context menu and select Formula in the available options.
In Calc, Draw and Impress, formulas are inserted as OLE objects without any background (flatfill) or edges. See the Manual for Math for more information.
Each formula object is inserted in a sheet, drawing or slide as follows:
Calc A formula object may be anchored in a worksheet On page (default setting) or if To Cell. To change the type of anchoring for formulas in a worksheet:
Draw and Impress When a formula is inserted into a drawing or slide, it is inserted as floating OLE object and is not anchored to any specific position in a drawing/slide.
Formula objects in Calc, Draw and Impress can be modified, just like any other object placed in a worksheet, drawing or presentation, except for the size of
Formulas in Calc, Draw and Impress .33

formula objects and modifying the format of the text in a formula. For more information on adjusting the properties of an object, see Manual for Calc, Draw and Impress. For more information on the size of a formula object and formatting the text in a formula, see Manual for Math.
The following points will help you to select the right dialog box, to customize the properties of formula objects.
A graph in a worksheet is already an OLE object by itself, allowing you to use the Formula Editor cannot use a formula in a graph.
To make a formula in a graph, create the formula first in Formula Editor and copy the formula to the clipboard. You then create the graph in Calc and paste the formula into the chart. The formula is automatically converted into the correct format for inserting in the graph.
If you want to modify the formula later, then repeat the process of creating and copying and paste the formula.
Pages referenced in this manual — manufacturer, support and downloads.
Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.