Professional Documents
Culture Documents
LIbreOffice - Math Guide
LIbreOffice - Math Guide
LIbreOffice - Math Guide
0 Math Guide
The LibreOffice Equation Editor
Copyright
This document is Copyright 20112013 by its contributors as listed below. You may distribute it and/or modify it under the terms of either the !" eneral #ublic $icense %http&//www.gnu.org/licenses/gpl.html'( )ersion 3 or later( or the Creati)e Commons *ttribution $icense %http&//creati)ecommons.org/licenses/by/3.0/'( )ersion 3.0 or later. *ll trademar+s within this guide belong to their legitimate owners.
Contributors
,ean -ollis .eber -a/el 0ussman $aurent 1alland2#oirier
Feedback
#lease direct any comments or suggestions about this document to& documentation3global.libreoffice.org
Acknowledgments
This guide is adapted and updated from the OpenOffice.org 3.3 Math Guide. The contributors to that boo+ are& 4aniel Carrera #eter 6upfer ,ean -ollis .eber *gnes 1el/unce 7an $aurenson 8ichele :arri T, 5ra/ier ,anet 8. 9wisher
*dditional material has been added from the erman Math Handbuch for $ibre;ffice 3.< %translated to =nglish by -a/el 0ussman'. Contributors to that boo+ are& 0egina -enschel isbert 5riege %4maths' Christian 6>hl ,ochen 9chiffers 5lorian 0eisinger
*dditional material has been added from the 5rench How-To Math for $ibre;ffice %translated to =nglish by $aurent 1alland2#oirier'. Contributors to that boo+ are& 1ernard 9iaud 5r?d?ric #arrenin
Contents
Copyright.............................................................................................................................. 2
Contributors................................................................................................................................. 2 5eedbac+..................................................................................................................................... 2 *c+nowledgments........................................................................................................................ 2 #ublication date and software )ersion......................................................................................... 2
Preface.................................................................................................................................. 6
.ho is this boo+ for@................................................................................................................... A .here to get more help............................................................................................................... A .hat you see may be different.................................................................................................... B .hat are all these things called@................................................................................................. C "sing $ibre;ffice on a 8ac.......................................................................................................... D .ho wrote this boo+@.................................................................................................................. D 5reEuently as+ed Euestions......................................................................................................... D
What is
ath!..................................................................................................................... ""
#etting started....................................................................................................................""
Creating an eEuation as a separate document........................................................................... 11 7nserting a formula into a .riter document................................................................................ 12
Customi,ations.................................................................................................................. %(
5ormula editor as a floating window........................................................................................... 3< *dd button to toolbar................................................................................................................. 3G *dd +eyboard shortcut............................................................................................................... 3G Customi/ing the catalog............................................................................................................. 3A Customi/ing operators............................................................................................................... 3C 9pace at the end of a formula.................................................................................................... 3C 4efault layout with style............................................................................................................. 3D *pplication to chemical formulas................................................................................................ <0
$-tensions.......................................................................................................................... (%
4maths an eFtension for more than Iust faster formula input.................................................. <3 9ymbolic computation with Cmath;;o and Cmath;;oC*9....................................................<G
/echnical details................................................................................................................ (0
;*979 ;pen 4ocument 5ormat for ;ffice applications..............................................................<G -andling of formulas in 1asic.................................................................................................... <G
*nde-.................................................................................................................................... 62
&
Preface
Who is this book for!
$ibre;ffice 8ath is an eEuation %formula' editor. *nyone who wants to get up to speed Euic+ly with 8ath will find this boo+ )aluable. 7f you ha)e ne)er used $ibre;ffice 8ath before( or you want an introduction to all of its components( you might li+e to read Getting 'tarted with LibreOffice $.% first.
Help system
$ibre;ffice comes with an eFtensi)e -elp system. This is your first line of support for using $ibre;ffice. To display the full -elp system( press () or go to 3elp 4 5ibre6ffice 3elp on the main menu bar. 7n addition( you can choose whether to acti)ate Tips( E*tended tips( and the He!p +gent by going to /ools 4 6ptions 4 5ibre6ffice 4 #eneral on the main menu bar. 7f Tips are enabled( ho)er the mouse pointer o)er any of the icons to see a small boF %tooltip' with a brief eFplanation of the iconKs function. 5or a more detailed eFplanation( select 3elp 4 What7s /his! on the main menu bar and ho)er the pointer o)er the icon.
7nternational support
*ccessibility options
You can get comprehensi)e online support from the community through mailing lists and the *s+ $ibre;ffice website( http&//as+.libreoffice.org/en/Euestions/. ;ther websites run by users also offer free tips and tutorials. This forum pro)ides community support for $ibre;ffice& http&//en.libreofficeforum.org/ This site pro)ides support for $ibre;ffice( among other programs& http&//forum.openoffice.org/en/forum/
Illustrations
The illustrations in this guide were ta+en from a )ariety of computers and operating systems. Therefore( some illustrations will not loo+ eFactly li+e what you see on your computer display. *lso( some of the dialogs may be different because of the settings selected in $ibre;ffice. You can either use dialogs from your computer system or dialogs pro)ided by $ibre;ffice %default'. To change to using $ibre;ffice dialogs if settings ha)e been altered& 1' ;n $inuF and .indows operating systems( go to /ools 4 6ptions 45ibre6ffice 4 #eneral on the main menu bar to open the dialog for general options. 2' ;n a 8ac operating system( go to 5ibre6ffice 4 Preferences 4 #eneral on the main menu bar to open the dialog for general options. 3' 9elect -se LibreOffice dia!ogs in Open#'a e dia!ogs and/or( in $inuF or 8ac ;9J operating systems only( .rint dia!ogs to display the $ibre;ffice dialogs on your computer display. <' Clic+ 68 to sa)e your settings and close the dialog.
Icons
The icons used to illustrate some of the many tools a)ailable in $ibre;ffice may differ from the ones used in this guide. The icons in this guide ha)e been ta+en from a $ibre;ffice installation that has been set to display the alaFy set of icons. 7f you wish( you can change your $ibre;ffice software pac+age to display alaFy icons as follows& 1' ;n $inuF and .indows operating systems( go to /ools 4 6ptions 45ibre6ffice 4 9iew on the main menu bar to open the dialog for )iew options. 2' ;n a 8ac operating system( go to 5ibre6ffice 4 Preferences 4 9iew on the main menu bar to open the dialog for )iew options. 3' 7n -ser interface / 0con si1e and st2!e select Ga!a*2 3defau!t4 from the options a)ailable in the drop2down list. <' Clic+ 68 to sa)e your settings and close the dialog.
9ome $inuF operating systems( for eFample "buntu( include $ibre;ffice as part of the installation and may not include the alaFy icon set. You should be able to download the alaFy icon set from the software repository for your $inuF operating system.
:ote
.reface
(igure )" Dia!og 3from 6a!c4 showing common contro!s 1' 2' 3' <' Tabbed page %not strictly spea+ing a control'. 0adio buttons %only one can be selected at a time'. Chec+boF %more than one can be selected at a time'. 9pin boF %clic+ the up and down arrows to change the number shown in the teFt boF neFt to it( or type in the teFt boF'. G' Thumbnail or pre)iew. A' 4rop2down list from which to select an item. B' #ush buttons. 7n most cases( you can interact only with the dialog %not the document itself' as long as the dialog remains open. .hen you close the dialog after use %usually( clic+ing 68 or another button sa)es your changes and closes the dialog'( then you can again wor+ with your document. 9ome dialogs can be left open as you wor+( so you can switch bac+ and forth between the dialog and your document. *n eFample of this type is the 5ind N 0eplace dialog.
;sing 5ibre6ffice on a
ac
9ome +eystro+es and menu items are different on a 8ac from those used in .indows and $inuF. The table below gi)es some common substitutions for the instructions in this chapter. 5or a more detailed list( see the application -elp. indo!s or Linu"
/ools 4 6ptions menu selection 8ight-c!ic9 6tr! 36ontro!4 (& ())
Mac e#ui$alent
5ibre6ffice 4 Preferences 6ontro!:c!ic9 36ommand4 'hiftOO(& OT
%ffect
*ccess setup options ;pens a conteFt menu "sed with other +eys ;pens the !a)igator ;pens the 9tyles and 5ormatting window
ay * distribute the P+F of this book) or print and sell copies! Yes( as long as you meet the reEuirements of one of the licenses in the copyright statement at the beginning of this boo+. You do not ha)e to reEuest special permission. 7n addition( we reEuest that you share with the proIect some of the profits you ma+e from sales of boo+s( in consideration of all the wor+ we ha)e put into producing them.
)%
What is
ath!
8ath is $ibre;fficeKs component for writing mathematical and chemical eEuations. 7t is most commonly used as an eEuation editor for teFt documents( but it can also be used with other types of documents or stand2alone. .hen used inside .riter( the eEuation is treated as an obIect inside the teFt document.
:ote
The eEuation editor is for writing eEuations in symbolic form( as in eEuation 1. 7f you want to e)aluate a numeric )alue( see the 6a!c Guide.
df ( * ) =ln ( * )+ tan1 ( * 2) d* or
!-3 + -2 ; !-+ < + ;-
%1'
#etting started
You can create an eEuation %formula' as a separate document or insert it into a document in .riter or another component of $ibre;ffice.
;n the menu bar( choose File 4 :ew 4 Formula. ;n the standard toolbar( clic+ the triangle to the left of the :ew icon and choose Formula. 5rom the 9tart Center( clic+ Formula.
*n empty formula document opens %see 5igure 2'.
Getting started
))
The upper area is the pre)iew window( where the eEuation will appear during and after input. The lower area is the eEuation editor( where the mar+up code for the eEuation is entered. The floating =lements window will also appear.
(igure 3" Equation Editor= E!ements window= and !ocation of resu!ting equation in >riter
/ip
.hen you are done entering the formula( you can close the editor by pressing the Esc +ey or by clic+ing an area outside the formula in the main document. * double2clic+ will open the editor again( so you can edit the formula. 5ormulas are inserted as ;$= obIects. 7n a .riter document( the formula is anchored as a character( so it is embedded in the continuous teFt. You can( as with any other ;$= obIect( change the anchor and ma+e the formula floating. 7n Calc( 7mpress( and 4raw documents( formulas are embedded as floating ;$= obIects. 7f you freEuently need to insert formulas( it is ad)isable to add the 5ormula button to the 9tandard toolbar or create a +eyboard shortcut. 9ee P*dd button to toolbarQ or P*dd +eyboard shortcutQ on page 3G.
)<
$ntering a formula
The eEuation editor uses a mar+up language to represent formulas. 5or eFample( ?beta creates the ree+ character beta % '. This mar+up is designed to read similar to =nglish whene)er a possible. 5or eFample( a o er b produces a fraction& . b You can enter a formula in three ways&
9elect a symbol from the =lements window. 0ight2clic+ on the eEuation editor and select the symbol from the conteFt menu. Type mar+up in the eEuation editor.
The conteFt menu and the =lements window insert the mar+up corresponding to a symbol. This pro)ides a con)enient way to learn the $ibre;ffice 8ath mar+up.
:ote
Clic+ on the document body to eFit the formula editor. 4ouble2clic+ on a formula to enter the formula editor again.
(igure $" '2mbo!s are di ided into categories The =lements window is di)ided into two main parts.
The top shows the symbol categories. Clic+ on these to change the list of symbols. The bottom shows the symbols a)ailable in the current category. /ip
You can hide or show the =lements window with 9iew 4 $lements.
Entering a formu!a
)3
(igure &" 'e!ecting the mu!tip!ication s2mbo! .hen you select the multiplication symbol on the =lements window( two things happen& The eEuation editor shows the mar+up& R@S times R@S
(igure ," 8esu!t of se!ecting the mu!tip!ication s2mbo! The R@S symbols shown in 5igure A are placeholders that you can replace by other teFt( for eFample 5 and 4. The eEuation will update automatically( and the result should resemble 5igure B.
/ip
4uring edition of a formula( reser)ed placeholders are indicated by sEuares in the formula and <?> in the command window. You can na)igate through these placeholders than+s to F4 and Shift+F4.
/ip
To +eep the eEuation from updating automatically( select 9iew 4Auto;pdate display. To update a formula manually( press (; or select 9iew 4 ;pdate.
)$
(igure 5" 8esu!t of entering & and $ ne*t to the times operator
:ote
arkup
You can type the mar+up directly in the eEuation editor. 5or eFample( you can type 5 times 4 to obtain G < . 7f you +now the mar+up( this can be the fastest way to enter a formula.
/ip
The formula mar+up resembles the way the formula reads in =nglish.
Entering a formu!a
)&
1elow is a short list of common eEuations and their corresponding mar+up. (isplay a =b a2 )ommand
aTb aW2 int f%F' dF a RT b a times b
(isplay
)ommand
sErt UaV aMn sum aMn infinity F cdot y
a
an
f ( * ) d*
a b
a b
an
*2
#reek characters
ree+ characters % = = = ( etc' are common in mathematical formulas. These characters are not a ai!ab!e in the E!ements window or the right-c!ic9 menu. 5ortunately( the mar+up for ree+ characters is simple& Type a X sign followed by the name of the character( in =nglish.
To write a !owercase character( type the name of the character in lowercase. To write an uppercase character( type the name of the character in uppercase. To write in italic( add an i between % sign and the name of the character.
* complete table of eFamples. Lo!ercase %alpha %beta ree+ characters is pro)ided on page GC. 9ee the table below for some
%theta
%itheta
%iTHETA
*nother way to enter ree+ characters is by using the 9ymbols catalog window. Choose /ools 4 Catalog. This window is shown in 5igure D. "nder '2mbo! set( select #reek and double2clic+ on a ree+ letter from the list. The mar+up name of the character is shown below the list window.
),
(igure ;" '2mbo!s cata!og= used for entering Gree9 characters and some specia! s2mbo!s
.e want to enter the abo)e formula %the )alue of pi rounded to G decimal places'. .e +now the name of the ree+ character %pi'. 1ut we do not +now the mar+up associated with the symbol.
@tep "& Type % followed by the teFt pi. This displays the @tep 2& ;pen the =lements window %9iew 4 $lements'. @tep %& The symbol is a relation( so we clic+ on the 0elations button. 7f you ho)er the mouse o)er this button you see the tooltip 8e!ations %5igure 10'. 5igure 11 shows the =lements window after clic+ing the 0elations button. The symbol we want is circled. ree+ character .
(igure )%" Too!tip indicates the 8e!ations button (igure ))" +fter se!ecting 8e!ations @tep (& Clic+ on the a b symbol. The eEuation editor now shows the mar+up %pi<?> simeq <?>.
Entering a formu!a )5
@tep 0& 4elete the R@S teFt( press the ($ +ey and type 3.14159 at the end of the eEuation. .e end up with the mar+up %pi simeq 3.14159. The result is shown in 5igure 12.
Changing a formula
You can change a formula at any time. To switch into edit mode( double2clic+ on the formula.
7n the eEuation editor( clic+ on the location. 9elect an area of the mar+up code that you wish to change. Clic+ on an element in the pre)iew areaY the cursor will automatically mo)e to the
corresponding point in the eEuation editor.
4ouble2clic+ on an element in the pre)iew areaY the corresponding section in the eEuation
editor will be selected. To be able to wor+ in the upper %pre)iew' area in the stand2alone 8ath window %5igure 2'( the formula cursor must be acti)ated. "se the (ormu!a 6ursor button on the Too!s toolbar.
/ip
)7
Caution
The use of eFperimental features can lead to program crashes and/or loss of data. ;nly ma+e the abo)e change if you can accept this ris+.
Formula layout
The most difficult part of using $ibre;ffice 8ath comes when writing complicated formulas. This section pro)ides some ad)ice.
" 1 over 2
1 over 2!
7n the first eFample( 8ath has recogni/ed that the 2 before and the - after the over belong to the fraction( and has represented them accordingly. 7f you want -B" rather than - to be the denominator( you must brac+et them together so that both will be placed there. 7n the second eFample( 8ath has recogni/ed the minus sign as a prefiF for the " and has therefore placed it in the numerator of the fraction. 7f you wish to show that the whole thing is negati)e( with the minus sign in front of the fraction( you must put the fraction in brac+ets in order to signify to 8ath that the characters belong together. The braces belong solely to the layout of the mar+up code and are not printed. 7f you wish to use braces in the formula( use the commands lbrace and rbrace. Compare the following eFamples& Mar,up x over "x + 1! -esult * *+1 Mar,up x over lbra#e "x + 1 rbra#e -esult * { * +1 }
:ote
0ows are separated by two ZKs and entries within each row are separated by one Z.
(ormu!a !a2out
);
The first problem people ha)e with matrices is that brac+ets do not scale with the matriF& Mar,up & matrix a $ b $$ # $ % ! ' -esult (a b) c d
$ibre;ffice 8ath pro)ides scalable brac+ets. That is( the brac+ets grow in si/e to match the si/e of their contents. "se the commands !eft3 and right4 to ma+e scalable brac+ets. Mar,up le(t& matrix a $ b $$ # $ % ! right' -esult
( )
a b c d
/ip
"se !eft@ and rightA to obtain sEuare brac+ets. The list of all a)ailable brac+ets is on page G<. 7f you want all brac+ets to be scalable( go to Format 4 @pacing. Then in the 'pacing dialog( choose the category Brac9ets and chec+ the option @cale all brackets.
/ip
These scalable brac+ets may also be used with any element( such as fraction( sEuare root( and so on.
*= * for * 0 * for * ! 0
can be represented by
abs x + le(t lbra#e sta#, x -(or- x .+ / $ 0x -(or- x 1 /! right 2o2e
2ecogni,ing functions in
ath
7n the basic installation( 8ath outputs )ariables in italics. 7f you enter a function( 8ath usually recogni/es it and outputs it normally. 7f 8ath fails to recogni/e a function %a list of recogni/ed functions begins on page <C'( you can inform 8ath about it. =nter the mar+up code func before the function( and the following teFt will be recogni/ed as a function.
<%
9ome functions recogni/ed by 8ath need to be followed by numbers or )ariables. 7f these are missing( 8ath puts an in)erted red Euestion mar+ in their place( which you can only remo)e by correcting the formula& enter a )ariable or a number( or a pair of empty braces U V as a placeholder.
/ip
Your first reaction would be to simply press the Enter +ey. -owe)er( if you press the Enter +ey( although the mar+up goes to a new line( the resulting eEuation does not. You must type the newline command eFplicitly. This is illustrated in the table below. Mar,up x + 3 4 + 1 x + 3 2e5li2e 4 + 1 -esult
* =3 2 =1
* =3 2 =1
7f you want to continue the calculation on a new line without writing a complete new eEuation( this is not directly possible( because 8ath eFpects a term on the left hand side of an eEuals sign. You can substitute&
=mpty Euotes ]]. This will automatically cause the line to be left2Iustified. =mpty braces U V. The line will then be centered. 9paces characters ^ or _. The line will be centered with the spaces.
The alignment of eEuals signs under each other is described on page 23. *s well( spacing between elements in formulas is not set by space characters in the code. You need to use special mar+up to add spaces& 6 %gra)e' for a small space( 7 for a large space. *nother solution would be to add space characters between Euotes( to be considered as teFt. 9pace mar+up at the end of a formula are ignored by default %see P9pace at the end of a formulaQ on page 3C'.
-esult
a9
9 =1
*
f ( t ) dt
0
or
0 f (t ) dt
(ormu!a !a2out
<)
Mar,up
i2t (rom ;e ( s8m to i2(i2it4 2: 02!
-esult
f
"
2n
:ote
:ote
Mar,up
!otice that we ha)e to use braces %sEuiggly brac+ets' to ma+e the deri)ati)e.
-esult
%x! partial 4! partial t:2!
%(! over
df d* #f #2 #2 f #t 2
To write function names with primes( as is usual in school notation( you must first add the signs to the catalog. "sing single and double Euotes is typographically ugly. 9ee PCustomi/ing the catalogQ on page 3A.
"se double Euotes to mar+ the character as teFt( for eFample 2KEKL ...2. ;b)iously this is
not possible for the double2Euote character itself.
*dd the character to the catalog. 9ee PCustomi/ing the catalogQ on page 3A.
7n some cases you can use commands&
lbrace and rbrace gi)e you literal braces {}. mline gi)es you the )ertical line( for eFample 2 mline % for ( 23 )
Con)ersion into a character entity as in html or the use of an escape character is not possible in 8ath.
<<
/e-t in a formula
To include teFt in a formula( enclose it in straight double2Euotes&
abs x + le(t lbra#e matrix x $ -(or - x .+ / $$ 0x $ -(or - x 1 /! right 2o2e
*= * for * 0 * for * ! 0
*ll characters eFcept double Euotes are permissible in teFt. "nfortunately the 9pecial characters dialog is not a)ailable. 7f necessary( you can write the teFt in a teFt document and copy it into the eEuation editor )ia the clipboard. 7n this way smart Euotes can be inserted( as shown below.
(igure )3" 'mart quotes inc!uded b2 cop2 and paste from >riter. TeFt is shown in the font that was selected from the /e-t list in the Fonts dialog %compare with the section PChanging the fontQ on page 2G'. To use a font from the lower window of the eEuation editor( set the attribute @erif( @ans or Fi-ed before the teFt. 1y default( teFt is left2Iustified. You can change the Iustification with alignc or alignr %see PChanging the alignmentQ on page 2C'. Commands are not interpreted within teFt. "se Euotes to brea+ up the teFt if you wish to use special formatting commands. -I2 - #olor bl8e bol% -isos#eles- -tria2gles< the base a2gles are e=8al-
-esult *+ 2 * = 2 = 2 2
The empty braces around T are necessary because T is a binary operator and thus needs an eFpression on each side. You may replace them with space characters %^ or _'.
(ormu!a !a2out
<3
You can reduce the spacing around T if you change the inter2column spacing of the matriF& 1' .ith the eEuation editor open( choose Format 4 @pacing from the menu bar. 2' 7n the 9pacing dialog %5igure 1<'( clic+ the Category button and select atrices in the drop2down menu. 3' =nter .E for Column spacing and clic+ 68.
(igure )&. Edit Base si1e 3top4 to ma9e a formu!a bigger The result of this change is illustrated in 5igure 1A.
<$
:ote
The si/e of a subset of characters in a formula may be modified using the size command. 5or instance& b size 5{a} & b a . 7n $lements window( last but one icon of +ttributes tab gi)es the size command. The )alue Iust after size may be absolute %numeric )alue' or relati)e to the conteFt %base si/e by default'& + ( !3( "#( or $# for instance.
(igure )5" (onts dia!og The 6ustom fonts section determines which font will be used when the attribute font serif( font sans or font fi-ed is specified.
<&
odify listboF.
Choose the type of entry you wish to modify. The (onts dialog opens( showing all the fonts a)ailable on your system.
(igure )7" (ont dia!og 7f you enter an initial character in the upper teFt boF( the list will Iump to that place. 1y entering a few additional characters( you can specify the eFact font that you want. 7f you do not +now its name( use the scrollbar to scroll through them. Clic+ on any name and the boF below will show a pre)iew. `ariables should be written in italics( so ma+e sure that the 0ta!ic option is selected. 5or all other elements( use the basic %0oman' form. The style can be easily altered in the formula itself by using the commands italic or bold to set these characteristics and nitalic or nbold to unset them. .hen you ha)e chosen a new font for a formula( the old font remains in the list alongside the new one and can be selected again. This applies only to the current sessionY the old font is not stored permanently. You can choose whate)er fonts you li+e( but if you are eFchanging documents with someone else( you should choose fonts that are present on your colleagueKs computer.
<,
3' Choose appropriate spacing )alues %the types of spacing that can be set depend on the category' and clic+ 68.
:ote
Changes in spacing apply only to the current formula. To change spacing generally( clic+ on the +efault button and then 68.
9pacing changes are possible for the categories shown in the following table. )ategory
9pacing
Possible ad.ustment
$ine spacing
0oot spacing
9uperscript 5ractions
9ubscript
4enominator
=Fcesslength $imits
$ine thic+ness
$ower limit
=Fcess si/e
9pacing
<5
8atrices
Column spacing
8inimum spacing
9pacing
$eft
0ight
Top
1ottom
(igure <%" +!ignment dia!og -ere again you can use the +efault button to ma+e the change apply to all formulas and not Iust the current one. The following eFample shows the effect in different situations. /lignment
left
%"amples * 2 D * * 2 D *
( )
100 B 100 B
centered %4efault'
( )
<7
/lignment
right
%"amples * D *
2
( 100 7)
7t is not possible to align formulas on a particular character. 4efault settings of alignment do not apply to teFt elementsY they are always aligned left. 7n the following eFamples( the default alignment is right but the first eFample begins the second line with teFt %albeit empty teFt' and is therefore aligned left. Mar,up )ode 1+2+3+>! over ? + 2 over 2e5li2e --+2+1 over 1?/ 1+2+3+>! over ? + 2 over 2e5li2e !+2+1 over 1?/ @/+A/+B/+C/! -esult 1 +2 + 3 + < 2 + G A0 + B0 + C0 + D0 1 =2 + 1G0 1 +2 + 3 + < 2 + G A0 + B0 + C0 + D0 1 =2 + 1G0
@/+A/+B/+C/!
7ndependent of the default alignment( it is possible to align formulas eFplicitly using the commands alignl( alignc and alignr. This attribute also wor+s for teFt elements.
%2'
<;
!ow you can double2clic+ on the formula to edit it. 5or eFample( here is the 0iemann :eta function& $ ( 1 )=
n=1
1 n1
%3'
You can reference an eEuation %Pas shown in =Euation %2'Q' with these steps& 1' Choose *nsert 4 Cross1reference from the menu bar. 2' ;n the 6ross-references tab %5igure 21'( under T2pe( select Te*t. 3' "nder 'e!ection( select the eEuation number. <' "nder 0nsert reference to( select 8eference. G' Clic+ *nsert. 4oneH 7f you later add more eEuations to the paper before the referenced eEuation( all the eEuations will automatically renumber and the cross2references will update.
/ip
To insert the eEuation number without parentheses around it( choose Cumbering instead of 8eference under 0nsert reference to.
(igure <). 0nserting a cross-reference to an equation number The *utoTeFt inserted as a result of the abo)e procedure consists of a 1F2 table. The left cell contains the formula and the right one the number. The number is an automatic counter named TeFt. You can edit the *utoTeFt if( for eFample( you prefer sEuare rather than round brac+ets( or if you want formula and number to be separated by tabs rather than formatted as a table. 0ead the section on P"sing *utoTeFtQ in Chapter 3 in the >riter Guide %.or+ing with TeFt'.
3%
Position
!ormally a formula is anchored +s character in a .riter document. 1ut as with any other ;$= obIect( you can change the anchoring mode to position the formula where you want it. 5or more information( see Chapter 11 of the Getting 'tarted guide % raphics( the allery( and 5ontwor+'. 1y default( formula obIects anchored +s character are automatically aligned )ertically to the baseline of the surrounding teFt. To align the formula manually( go to /ools 4 6ptions 4 5ibre6ffice Writer 4 Formatting Aids and unchec+ the option ath baseline alignment. This setting is stored with the document and applies to all formulas within it. !ew documents use the current setting from this dialog.
argins
*n inserted 8ath obIect has margins to left and right of it( separating it from surrounding teFt. 7f you do not want this( it is best to alter the frame style for formulas( as this will apply simultaneously to all eFisting formulas and those still to be inserted in the document. #roceed as follows& 1' #ress F"". The 't2!es and (ormatting dialog opens. 2' Clic+ on the (rame 't2!es tab. 3' 5ind the (ormu!a frame style and right2clic+ on it. <' Choose Modif2 from the conteFt menu. The (rame 't2!e dialog opens. G' 9witch to the >rap tab of the dialog. Change the )alues for Left and 8ight in the 9pacing section to 0.00. A' Clic+ 68 to close the dialog. This changes the spacing for all formulas that ha)e not had their spacing adIusted manually. You can find more information on using styles in P4efault layout with styleQ on page 3D and in Chapter 3 of the Getting 'tarted guide %"sing 9tyles and Templates'.
/e-t mode
$arger formulas should always be in a paragraph of their own( separated from the teFt. .hen you use formula elements in running teFt( they can often be higher than the letter height. -owe)er( if it is necessary to place a formula within running teFt( switch into the eEuation editor and go to Format 4 /e-t mode. 8ath will try to shrin+ the formula to fit the letter height. The numerators and denominators of fractions are shrun+( and the limits of integrals and sums are placed beside the integral/sum sign.
%"ample'
* formula in a separate paragraph&
i2
i =2 2 and the same formula embedded in teFt mode& G i= 2 i
:ote
You cannot insert the document by dragging and dropping with the mouse( nor by using *nsert 4 File.
5ormulas cannot be stored in the gallery because they are not in graphical format. You can( howe)er( store a formula as *utoTeFt. .rite the formula in a separate paragraph( select it( and go to $dit 4 Auto/e-t. 5or further information see P"sing *utoTeFtQ in Chapter 3 in the >riter Guide %.or+ing with TeFt'.
2e"t attributes
*ll teFt attributes( such as font and alignment( refer not to the formula teFt but to the teFt element present in all graphical obIects. 5or a selected obIect( this can be accessed )ia the (< +ey. 5or further information( read the P.or+ing with teFt in 4rawQ in Chapter 10 %*d)anced 4raw TechniEues' of the Draw Guide.
Position
* formula can be positioned anywhere you li+e. "se the mouse( the arrow +eys( or the #osition and 9i/e dialog a)ailable from Format 4 Position and @i,e.
3<
1i3e
7n documents a formula is not represented directly but replaced by a graphic. The si/e of this graphic is initially protected. To change the si/e( open the #osition and 9i/e dialog and( on the first page( in the .rotect section( unchec+ the @i,e chec+boF. This acti)ates the 'i1e section directly abo)e. =nter your modifications. .hen the dialog is closed( the si/e will immediately be protected again. Changing the si/e does not affect the formula itself but only its graphical representation. 7n particular the basic font si/e of the formula %see PChanging the font si/eQ on page 2<' does not change. To re)ert to the si/e determined by the formula content( use the Origina! 'i1e option in the conteFt menu. This allows si/ing errors that are sometimes caused by inserting a formula from a different module to be corrected.
$ines are not wrapped automaticallyY you must use the newline command. You can use Format 4 Fonts to match the teFt to its surroundings. 9ee PChanging the fontP on page 2G.
33
Now, the quadratic complement is introduced 2 2 2 = x 6x + 3 3 7 and then elements are gathered = x 26x + 32 32 7 =( x 3 ) 16 Formulas in riter OL% ob.ects
2
To be able to use all the facilities possible in teFt documents( create the formula and its teFt in .riter. Choose a page si/e that roughly matches your e)entual obIecti)e. 4o not write more than one page because page selection causes problems later. 9a)e the document. 7n 7mpress %or 4raw or Calc'( use *nsert 4 6b=ect 4 65$ 6b=ect and then choose the option 6reate from fi!e. The formula is embedded as an ;$= obIect in a document that is itself an ;$= obIect. *s a result( the formula cannot be modified in 7mpress. 5or that reason( you should always acti)ate the option Lin9 to fi!e. Then if you need to ma+e a change( open the teFt document and edit teFt and formula there. 7n 7mpress( use $dit 4 5inks and then the ;pdate button to display the stored )ersion of the teFt document. 4o not try to modify the formula in 7mpressY it causes the representation to become faulty.
Formulas in charts
* chart is itself an ;$= obIect. Therefore you cannot call up the eEuation editor within it. There is no freestanding module of $ibre;ffice that creates charts( so you cannot use anything similar to the abo)e method using .riter either. -owe)er you can create a formula outside the charts editor( copy it to the clipboard( acti)ate the chart for editing( and paste in the formula from the clipboard. This automatically con)erts the formula into a metafile graphic. 7f you wish to ma+e further modifications( you must discard it and repeat the procedure.
Customi,ations
-ere are a few ways to customi/e your use of 8ath.
3$
5igure 23 shows the result. You can doc+ the floating window again by using the same steps. -old down the 6ontro! +ey and double2clic+ the window frame.
(igure <$" +dd a button to insert a formu!a G' Clic+ on Add. You can continue to add buttons or clic+ on Close. A' ;n the Customi/e dialog( use the arrows to mo)e buttons up or down the list before )alidating with 68.
6ustomi1ations
3&
2' 9elect the le)el of the shortcut& LibreOffice to benefit from it in all components %if the shortcut is not used in this component' or only in the current component. 3' 9elect the *nsert category( then the Formula command %the one not corresponding to F# shortcutY that command corresponds to the eEui)alent of a spreadsheet formula'. <' 9elect the +eys to apply( then clic+ on odify. G' #roceed the same way for other shortcut with the same le)el( then )alidate with 68. 7f using your shortcut causes a formula bar to appear %as in Calc'( that means you chose the wrong (ormu!a command.
<' 5rom the 5ont list( choose a font that contains the desired symbol. .hen you ha)e selected a font( its characters appear in the font summary window. You can scroll through it using the scrollbar at the side( or use the 9ubset list to go straight to the place you need. To follow this eFample( choose the font DeDaEu 'ans and the subset Genera! punctuation. G' Clic+ on the desired symbol %here "F2032'. 7t appears enlarged in the right2hand pre)iew boF %see 5igure 2B'. 8a+e sure that the symbol set is set to @pecial. A' 7n the 9ymbol field( enter a name for the symbol( for eFample prime. B' 7f the name is not already in use( the Add button becomes acti)e. Clic+ on it. C' You can immediately add more symbols. 7n the eFample( the P"O2033Q symbol( named dblprime( and the P"O203<Q symbol( named triprime( are added. %9ee 5igure 2C.' D' Clic+ 68 to close the dialog.
(igure <5" Edit '2mbo!s dia!og" characters se!ected !ow the 9ymbol set )iew area shows the new symbol. 7t can be selected Iust li+e the other symbols( either from here( or by writing them directly into the eEuation editor in the form Xprime.
Caution
9ymbols % ree+ or 9pecial'( in contrast to commands( are case sensiti)e %lowercase uppercase'.
6ustomi1ations
35
There are numerous free fonts containing a great number of mathematical symbols. The P9T7J1Q font is worthy of special mention here. 7t was de)eloped specially for writing mathematical/technical teFts. The 4eIa`u2 and $ucida3 fonts also ha)e a wide range of symbols.
:ote
8any symbols occur in more than one font. 7f you want to eFchange documents with others( ta+e care to use a font that is installed on their machine.
7n the basic $ibre;ffice installation( only those user2defined symbols that actually occur in the document are stored with it. 9ometimes it is useful to embed all the user2defined symbols( for eFample when the document is going to be further edited by another person. o to /ools 4 6ptions 4 5ibre6ffice ath and on the @ettings page( unchec+ the option $mbed only used symbols >smaller file si,e?.This setting is only a)ailable when you are wor+ing on a 8ath document.
Customi,ing operators
* name( to be recogni/ed as a function to be written with regular font not italic( must be preceded by mar+up code f20%. *n operator( to be enlarged and to accept limits as integral or sum( must be preceded by mar+up code &pe(. 7t is possible to use a letter( a name or a personal symbol %see PCustomi/ing the catalogQ on page 3A'. ( +i is written &pe( F f(&m {i i0 5} *6i.
i '0
You can modify the beha)ior of an operator or change one of your personal symbols in an operator( using mar+up codes b&pe(( to create a binary operator( and 2&pe(( to create a unary operator.
;pen a 8ath document with File 4 :ew 4 Formula. ;pen the customi/ation dialog with /ools 4 6ptions and choose 5ibre6ffice ath. ;n the @ettings page( unchec+ the option *gnore M and N at the end of the line.
(igure 3%" 'etting a defau!t temp!ate using the Temp!ate Manager dia!og To return to the default template supplied when $ibre;ffice was installed( go to the Template 8anager dialog %5igure 31'( clic+ the Action enu icon on the right( point to 2eset +efault /emplate on the drop2down menu( and clic+ /e-t +ocument.
6ustomi1ations
3;
%"ample -2 9;<
23C D2
%ntry 76# S864 %please note the spaceH' 9 's2b 9# 's2p #3: S864;{#!{}} or S864;{#<!<}
"
9;2 <
Cotes & 's2b or 's2p are abre)iations for !eft subscript and !eft superscript. =mpty braces after #! are necessary to a)oid errors as there is no right member after the minus sign. 5or re)ersible reactions( there is no satisfactory double arrow in 8ath. 7f you ha)e a font with a correct symbol( use the method described in PCustomi/ing the catalogQ on page 3A. 5or eFample( 4eIa`u fonts ha)e these double arrows . ;therwise( you can find a special character in a document and copy it( for instance in this formula& C+ ; C; ]]. You will find other double arrows here& http&//de).w3.org/htmlG/html2author/charref from character F021C<.
7n addition to eFporting documents as #45s( as described in Chapter 10( #rinting( =Fporting( and =mailing( of the Getting 'tarted guide( 8ath offers the possibility of eFporting formulas as 8ath8$. "nfortunately browsers do not follow this standard perfectly. 7f there are subseEuent faults in display( the fault lies with your browserH
$%
*s an eFample( ta+e this formula& Mar,up -esult $ ( 1 )= %Geta &G' + s8m (rom 2 + 1! to i2(i2it4 1 over 2:G!! 2e5li2e le(t&matrix a $ b $$ # $ %!right' 2e5li2e -Text- 2e5li2e i2t9/:x (&t' %t 2e5li2e x + 3 4 + 1 a b c d TeFt
* n= 1
( )
1 n1
0 f ( t ) dt
* =3 2 =1 This formula combines )arious possibilities that 8ath offers( which ma+es it useful for testing. 7f you are wor+ing in a separate 8ath document( go to File 4 @ave as to open the 'a e as dialog. Choose 8ath8$ from the list of a)ailable file formats( to sa)e your formula as 8ath8$.
5or an embedded formula( choose @ave copy as from the conteFt menu.
-esult
This formula was subseEuently tested in se)eral browsers.
5irefoF 1<.0.1
;pera 12.00
7nternet =Fplorer D
$)
Chromium 13 and
9afari G.1 only opens the file manager to sa)e the data.
Loading
7f a$b is chec+ed( $ibre;ffice con)erts 8icrosoft formulas into nati)e format when a document is loaded. This is possible if the formulas were created with 8athType4 %up to )ersion 3.1' or with the 8icrosoft =Euation =ditor. The latter is a reduced( older )ersion of 8athType licensed by 8icrosoft and included in the 8icrosoft ;ffice pac+age. 5ormulas created by newer )ersions of 8athType or by the new 8icrosoft formula editor P;88$5 =Euation =ditorQ %8icrosoft ;ffice 9uite 2010 and to some eFtent 200B' cannot be con)erted. 7f a document created in 8icrosoft ;ffice 2010 and containing an ;88$ formula is sa)ed into a .doc file format( 8icrosoft ;ffice con)erts the formula into a graphic. ;nly this graphic is then accessible to $ibre;ffice. 7f you load a .docF document that contains ;88$ formulas( these fail in con)ersion whether a$b is chec+ed or not. 7nside 8icrosoft ;ffice( formulas created with 8athType or 8icrosoft =Euation =ditor are treated as ;$= obIects. 7f a$b is not chec+ed( $ibre;ffice maintains this. 4ouble2clic+ing on the obIect launches 8athType and new formulas can be inserted using *nsert 4 6b=ect 4 65$ 6b=ect. This setup is to be recommended if you ha)e 8athType installed and wish to use it to create and edit formulas.
1a$ing
7f a9b is chec+ed( $ibre;ffice con)erts the formula into a form that can be read and modified by 8icrosoft =Euation =ditor and 8athType. .hen a9b is not chec+ed( the formula is treated as an ;$= obIect on con)ersion into a .doc format( and remains lin+ed to $ibre;ffice. * double2clic+ on the obIect in .ord will therefore attempt to launch $ibre;ffice. 7f you sa)e in the .docF format( formulas are not con)erted( whether a9b is chec+ed or not.
ord +0&0
.hen you use 8icrosoft ;ffice 2010( it is possible to open $ibre;ffice files in .odt format. 8icrosoft ;ffice 2010 reports an error but ne)ertheless displays a PrepairedQ document. 7n this document( any original formulas are con)erted to ;88$. 7f you sa)e it again in .odt format( 8icrosoft ;ffice 2010 con)erts the formulas into 8ath8$( and these formulas can then be edited in
4 http&//www.dessci.com/en/ 5 ;ffice 8ath 8ar+up $anguage $< LibreOffice $.% Math Guide
$ibre;ffice. Ta+e care that symbols that belong together are enclosed in grouping brac+ets( e)en if these are not necessary for display in $ibre;ffice itself. This enables $ibre;ffice to correctly translate the formula into 8ath8$. 5or eFample( use s2m f(&m {i=1} t& 0 {i;#} rather than s2m f(&m i=1 t& 0 i;#. 7n this procedure( the annotation element is lost. *s a result( $ibre;ffice no longer shows the original 8ath mar+up code in the eEuation editor( but instead generates a new mar+up code from the internal 8ath8$ notation.
O3/ 5
The J-T8$ file format is a)ailable only as an eFport format. 5or this reason you will find the option under File 4 $-port rather than File 4 @ave as. 7f this option is missing in your setup( you can install the necessary filter %run $ibre;ffice 9etup( select odify( and then select 6ptional Components 4 O@5/ @ample Filters'. The replacement graphic for the formula is embedded in the file( but the original 8ath mar+up code( included as an annotation element in 8ath8$( is absent in this case %compare with the section on P=Fport as 8ath8$Q on page <0'. .hether the document is correctly displayed depends on the browser. 5irefoF shows the document correctly including the formulas. ;pera and 7nternet =Fplorer ha)e some problems with the embedded graphic. The older filter P-T8$ 4ocument %;pen;ffice.org .riter'%.html'P does not sa)e formulas at all but uses only a poorly resol)ed graphic in .gif file format.
Flat O 5
This format can be both read and sa)ed by $ibre;ffice. 7f the option is not present under File 4 @ave or File 4 @ave as( you can install the necessary filter. 7n this format( the whole content of the document( including the template( is sa)ed within an J8$ document. 7n other words( it is not a compressed folder( as is usually the case for sa)ed ;pen4ocument files. *ny formulas are included as 8ath8$ elements( similar to the results of eFporting as 8ath8$. -owe)er indi)idual formulas are not sa)ed( only the whole document including the formulas. This format is suitable for direct entry into an eFternal )ersion control system.
$-tensions
7f you use 8ath freEuently( it may be interesting to install one of these two eFtensions( which ease formula editing. 1oth programmers do not compete( but help one each other when it is possible. -owe)er( Dmaths are 6mathOOo cannot be simultaneously installed. They are both complementaryY you may install them on separate logins to test them before choosing.
E*tensions
$3
(igure 3," Too!bars for switching on and off further functions 4maths offers numerous tools for creating mathematical documents&
9ingle2clic+ creation of 8ath formulas from teFt input %orange symbols' Creation of 8ath formulas using an input dialog %)iolet symbols' Tagging teFt %blue symbols' Changing the properties of eFisting formulas %green symbols' 4rawing graphics( grids( statistical diagrams and geometrical figures %cyan symbols' 4rawing and modification of geometric obIects %gray $ibre;ffice 4raw' dmath toolbar( also a)ailable in
/echnical details
6A@*@ 6pen +ocument Format for 6ffice applications
The ;45 specification does not lay down a completely new standard for 8ath formulas but ta+es o)er the 9tandard 8athematical 8ar+up $anguage %8ath8$' de)eloped by the .orld .ide .eb Consortium %.3C' for representing formulas on websites %compare http&//www.w3.org/T0/2003/0=C28ath8$2220031021'. ;f the two types pro)ided( #resentation mar+up and Content mar+up( ;45 uses the former. 7t therefore describes the representation of a formula rather than its mathematical meaning. The 8ath8$ mar+up language differs from the one used in the eEuation editor. 9o( for eFample( in the formula i0t f(&m {i=1} t& 3 {f>t? {0ita'i% )}t}( the parts f(&m... t& are not translated but con)erted into 8ath8$ similarly to i0t6{i=1};3. The original formula in the eEuation editor is a 9tar8ath7 G.0 encoding. To pre)ent it from being lost( it is stored as an annotation element. ;ther applications do not need either to e)aluate nor to sa)e this element( nor do they themsel)es create it. 7n $ibre;ffice a formula is always associated with a replacement graphic. 7n the container formats .odf( .odt( and so on these graphics are stored in a separate folder and are internally lin+ed to their document. -owe)er if you use the file format ;pen 4ocument %5lat J8$' or eFport to J-T8$( these graphics must be embedded. 5or this purpose they are encoded in 1*9=A<.
Formulas in a
riter document
7n a .riter document( all ;$= obIects( including formulas( belong to a collection of type 'wFTe*tEmbeddedObDects&
oD8rre2tDo2troller + @his,&mp&0e0tFgetD8rre2tDo2troller&' oTextEo#8me2t + oD8rre2tDo2trollerFMo%el oEmbe%%e%HbIe#ts + oTextEo#8me2tFEmbe%%e%HbIe#ts
This collection is numbered continuously from 0. You can find a gi)en obIect by&
2E2%I2%ex + oEmbe%%e%HbIe#tsFDo82t01 f&( 2I2%ex+/ t& 2E2%I2%ex oMathHbIe#t + oEmbe%%e%HbIe#tsFgetB4I2%ex&2I2%ex' 6 http&//www2fourier.uIf2grenoble.fr/_parisse/giac.html 7 $ibre;ffice is based on the 9tar;ffice suite( de)eloped by 9tar4i)ision. Technica! detai!s $&
To determine if this obIect is actually a formula( test whether it supports a ser)ice that is supported by formulas&
oMo%el + oMathHbIe#tFMo%el if oMo%elFs8pportsServi#e&-#omFs82FstarF(orm8laFJorm8laProperties-' the0
*lternati)ely test if the C$974( which e)ery ;$= obIect possesses( is that belonging to a 8ath obIect&
if oMathHbIe#tFDLSIE + -/ABBAABA0?>JD0>?AJ0B??10@1>AeAA@aCCA- the0
"sing the model( you can then alter the properties of the formula( for eFample the basic font si/e&
oMo%elFBaseJo2tHeight + 12
To ma+e this change )isible( the formula must be redrawn. The 4Ate0)e),&0t(&'8Be(4mbe))e)8bCe%t property pro)ides some methods that specifically apply to ;$= obIects&
oKDHEH + oMathHbIe#tFExte2%e%Do2trolHverEmbe%%e%HbIe#t oKDHEHF8p%ate&'
*s an illustration( here is a macro modifying all formatting of all formulas already written in a document&
S2b Dha2geJormatJorm8le oD8rre2tDo2troller + @his,&mp&0e0tFgetD8rre2tDo2troller&' oTextEo#8me2t + oD8rre2tDo2trollerFMo%el oEmbe%%e%HbIe#ts + oTextEo#8me2tFEmbe%%e%HbIe#ts 2E2%I2%ex + oEmbe%%e%HbIe#tsFDo82t01 f&( 2I2%ex+/ t& 2E2%I2%ex oMathHbIe#t + oEmbe%%e%HbIe#tsFgetB4I2%ex&2I2%ex' oMo%el + oMathHbIe#tFMo%el if &0&t isL8ll&oMo%el'' the0 if&0&t isEmpt4&oMo%el'' the0 if oMo%elFs8pportsServi#e&-#omFs82FstarF(orm8laFJorm8laProperties-' the0 M or i( oMathHbIe#tFDLSIE + -/ABBAABA0?>JD0>?AJ0B??10@1>AeAA@aCCA- the2 oMo%elFBaseJo2tHeight + 11 poli#eDomm82e+ -Liberatio2 Seri(M Nariables oMo%elFJo2tLameNariables+ poli#eDomm82e oMo%elFJo2tNariablesIsItali#+tr8e oMo%elFJo2tNariablesIsBol%+(alse M J82#tio2s oMo%elFJo2tLameJ82#tio2s + poli#eDomm82e oMo%elFJo2tJ82#tio2sIsItali#+(alse oMo%elFJo2tJ82#tio2sIsBol%+(alse M L8mbers oMo%elFJo2tLameL8mbers+ poli#eDomm82e oMo%elFJo2tL8mbersIsItali#+(alse oMo%elFJo2tL8mbersIsBol%+(alse M Text oMo%elFJo2tLameText+ poli#eDomm82e oMo%elFJo2tTextIsItali#+(alse oMo%elFJo2tTextIsBol%+(alse M Op%ate oKDHEH + oMathHbIe#tFExte2%e%Do2trolHverEmbe%%e%HbIe#t oKDHEHF8p%ate&' e0)if M i( (orm8la e0)if M i( 2ot empt4 e0)if M i( 2ot 28ll 0eAt 2I2%ex @his,&mp&0e0tFre(ormat&' M Met P Io8r to8s les QlQme2ts %8 %o#8me2t 40) S2b
$,
Chec+ help page8 on (ormu!a.roperties to +now all other properties you can modify.
)ommand +1 "1 +"1 or pl8smi28s 1 "+1 or mi28spl8s 1 a + b a " b a #%ot b a times b a R b a over b a %iv b a S b a #ir# b a 5i%eslash b a 5i%ebslash b 2eg a a a2% b or a T b a or b or a U b a bslash b a opl8s b a omi28s b a otimes b a o%ot b a o%ivi%e b 8oper mo2Hp b a boper mo2Hp b
(isplay +1
1 (1 or (1 )1 or )1
a+ b
a b
ab
a b
a*b a b a +b
a ,b
a -b
a b b a .a a /b or a /b a 0b or a 0b
a1 b
a 2b
a 3b
a 4b
Tensorial product
a 5b
a 6b
monOp b a monOp b
$7
2elations
Operation
7s eEual 7s not eEual $ess than $ess than or eEual to `ery small reater than reater than or eEual to `ery big *pproFimately 9imilar to 9imilar to or eEual Congruent #roportional #arallel ;rthogonal to 4i)ides 4oes not di)ide Toward *rrow left 4ouble arrow left and right *rrow right #recedes 9ucceeds #recedes or eEual to 9ucceeds or eEual to #recedes or eEual to 9ucceeds or eEual to 4oes not precede 4oes not succeed 4efinition 7mage from ;rigin from
)ommand
a + b a 1. b or a 2e= b a 1 b or a lt b a 1+ b a lesla2t b a ll b or a 11 b a . b or a gt b a .+ b a gesla2t b a gg b or a .. b a approx b a sim b a sime= b a e=8iv b a prop b a parallel b a ortho b a %ivi%es b a 2%ivi%es b a to5ar% b a %larro5 b a %lrarro5 b a %rarro5 b a pre# b a s8## b a pre##8rl4e= b a s8###8rl4e= b a pre#sim b a s8##sim b a 2pre# b a 2s8## b a %e( b a tra2sl b a tra2sr b
(isplay a =b
a 7b or a 7b a ! b or a ! b a b a 8b a 9 b or a 9 b a : b or a : b a b a ;b a < b or a < b a =b
a >b
a b
a ?b
a@b
aAb
aBb
ab
aC b a b
aDb
a &b
aEb
a Fb
a Gb
a Hb
a Ib
a Jb
a Kb a Lb
a Mb
a Nb
aOb
aPb
$;
@et operations
Operation
7s in 7s not in ;wns 7ntersection "nion 4ifference Luotient 9ubset 9ubset or eEual to 9uperset 9uperset or eEual to !ot subset !ot subset or eEual !ot superset !ot superset or eEual =mpty set *leph 9et of natural numbers 9et of integers 9et of rational numbers 9et of real numbers 9et of compleF numbers
)ommand a i2 B a 2oti2 B A o52s b or A 2i b A i2terse#tio2 B A 82io2 B A setmi28s B A slash B A s8bset B A s8bsete= B A s8pset B A s8psete= B A 2s8bset B A 2s8bsete= B A 2s8pset B A 2s8psete= B empt4set aleph setL setV setW set; setD
(isplay
a'B
aQB + R b or + R b
+S B
+T B
+1 B
+, B
+U B
+V B
+W B
+X B
+Y B
+Z B
+[ B
+\ B ]
^
_
`
a
b
c
&%
Functions
Operation
*bsolute )alue 5actorial 9Euare root nth root #ower =Fponential !atural logarithm =Fponential function $ogarithm 9ine Cosine Tangent Cotangent -yperbolic sine -yperbolic cosine -yperbolic tangent -yperbolic cotangent *rcsine *rccosine *rctangent *rccotangent *rea hyperbolic sine *rea hyperbolic cosine *rea hyperbolic tangent *rea hyperbolic cotangent
)ommand abs a! (a#t a! s=rt a! 2root 2! a! a: b! (82# e: a! l2&a' exp&a' log&a' si2&a' #os&a' ta2&a' #ot&a' si2h&a' #osh&a' ta2h&a' #oth&a' ar#si2&a' ar##os&a' ar#ta2&a' ar##ot&a' arsi2h&a' ar#osh&a' arta2h&a' ar#oth&a'
(isplay
a
ad
a
n a
ab
ea ln ( a ) eFp ( a)
log ( a )
sin ( a )
cos ( a )
tan (a )
cot ( a )
sinh ( a )
cosh ( a )
tanh ( a )
coth (a )
arcsin ( a )
arccos ( a )
arctan ( a)
arccot ( a )
arsinh ( a )
arcosh ( a )
artanh( a )
arcoth ( a)
&)
6perators
*ll operators can be used with the limit functions %PfromQ and PtoQ'. Operation
$imit $ower limit "pper limit 9um #roduct Coproduc 7ntegral 4ouble integral Triple integral Contour integral 4ouble cur)ed integral Triple cur)ed integral $ower bound shown with summation symbol "pper bound shown with product symbol "pper and lower bounds shown with integral Customi/ed operator
)ommand lim a! limi2( a! lims8p a! s8m a! pro% a! #opro% a! i2t a! ii2t a! iii2t a! li2t a lli2t a llli2t a s8m (rom pro% to i2t (rom a 3! b 3! r r9/! to r9t!
(isplay lim a
lim inf a
lim sup a
a ea fa a ga ha ia ja ka
b
3
er a
r0 rt
oper Hp (rom / to 1 a
Op a
0
&<
Attributes
Operation
*cute accent ra)e accent 0e)erse circumfleF 1re)e Circle 4ot 4ouble dot Triple dot $ine abo)e `ector arrow Tilde CircumfleF .ide )ector arrow .ide tilde .ide circumfleF $ine o)er $ine under $ine through Transparent %useful to get a placeholder of a gi)en si/e' 1old font !ot bold font 7talic font9 !ot italic font 5ont si/e 5ont si/e 5ont si/e 5ollowing item in sans serif font 10 5ollowing item in serif font
)ommand a#8te a grave a #he#, a breve a #ir#le a %ot a %%ot a %%%ot a bar a ve# a til%e a hat a 5i%eve# ab# 5i%etil%e ab# 5i%ehat ab# overli2e ab# 82%erli2e ab# overstri,e ab# pha2tom a bol% a 2bol% a ital -a- or itali# -a2itali# a siGe 1@ =v siGe +12 =v siGe R1F? =v (o2t sa2s =v (o2t seri( =v
(isplay
l a
m a
n a
o a p a a q
a r
a s
a t
% a
a u
v a
% abc
u abc v abc
abc
abc
acb
a
a a or a
q
q
q
qv
9 "nEuoted teFt that is not a command is considered to be a )ariable. `ariables are( by default( italici/ed. 10 There are three custom fonts& sans serif %without +ic+s'( serifs %with +ic+s'( and fiFed %non2proportional'. To change the actual fonts used for custom fonts and the fonts used for )ariables %unEuoted teFt'( numbers and functions( use Format 4 5onts %see page 2G'. Math commands - 8eference &3
Operation
5ollowing item in fiFed font 8a+e color of following teFt cyan 11 8a+e color of following teFt yellow 8a+e color of following teFt white 8a+e color of following teFt green 8a+e color of following teFt blue 8a+e color of following teFt red 8a+e color of following teFt blac+ 8a+e color of following teFt magenta 8a+e color green returns to default color blac+ 1race items to change color of more than one item
)ommand (o2t (ixe% =v #olor #4a2 =v #olor 4ello5 =v #olor 5hite =v #olor gree2 =v #olor bl8e =v #olor re% =v #olor bla#, =v #olor mage2ta =v #olor gree2 K =v #olor gree2 K =v!
(isplay qv
q
q
q
q
q
q
q
q
Fq Fq
Arackets
Operation
roup brac+ets %used for program control' 0ound 1rac+ets 9Euare 1rac+ets 4ouble 9Euare 1rac+ets 1races *ngle 1rac+ets ;perator 1rac+ets "pper half sEuare brac+ets $ower half sEuare brac+ets 9ingle line 4ouble line 9calable round brac+ets %add the word PleftQ before a left brac+et and PrightQ before a right brac+et' 9Euare brac+ets scalable %as abo)e'
)ommand a! &a' )bX l%bra#,et # r%bra#,et lbra#e 5 rbra#e la2gle % ra2gle la2gle a mli2e b ra2gle l#eil a r#eil l(loor a r(loor lli2e a rli2e l%li2e a r%li2e le(t & sta#, a $ b $ G! right ' le(t ) a over b right X
(isplay
a
(a)
wb x
yc z {w }
{d |
{ a b | }a ~
a
a
AaA
()
a b 1
wx
a b
11 5or all coloring( the color will apply only to the teFt immediately following the command until the neFt space is encountered. 7n order to ha)e the color apply to more characters( place the teFt you want in color in curly brac+ets. &$ LibreOffice $.% Math Guide
Operation
4ouble sEuare brac+ets scalable 1race scalable *ngle brac+et scalable ;perator brac+ets scalable "pper half sEuare brac+ets scalable $ower half sEuare brac+ets scalable $ine scalable 4ouble line scalable "npaired brac+ets %add le(t before left brac+et and right before right brac+et' 7solated brac+et ;)er brace scalable "nder brace scalable
)ommand le(t l%bra#,et a over b right r%bra#,et le(t lbra#e a over b right rbra#e le(t la2gle a over b right ra2gle le(t la2gle a over b mli2e # right ra2gle le(t l#eil a over b right r#eil le(t l(loor a over b right r(loor le(t lli2e a over b right rli2e le(t l%li2e a over b right r%li2e le(t la2gle a over b right r(loor le(t lbra#e sta#, a+2$b+3! right 2o2e the bra#e is above! overbra#e a the bra#e is belo5! 82%erbra#e (!
(isplay
yz {} { | { | }~ AA {
a b a b a b a c b a b a b a b a b a b =2 {a b= 3
&&
Formats
Operation
0ight superscript 0ight subscript $eft superscript $eft subscript Center superscript Center subscript !ew line 9mall gap %gra)e' $arge gap %tilde' !o gap !ormal `ertical stac+ of 2
)ommand a: b! a9 b! a ls8p b! a ls8b b! a #s8p b! a #s8b b! asl%,(Io 2e5li2e sa%,(I st8(( 6st8(( st8((7st8(( 2ospa#e x+4 bi2om a! b! sta#, a $ b $ G! matrix a $ b $$ # $ % ! sta#, Hello 5orl% $ alig2l&a'! sta#, Hello 5orl% $ alig2#&a'! sta#, Hello 5orl% $ alig2r&a'! matrix a $ -+- $ alig2l b! $$ ! $ -+- $ alig2l #+1! ! sta#, alig2l a! + b $ alig2l pha2tom a! + #+1! ! x + 4 !
(isplay ab
ab
b
a
b
as!d9fDo sad9fD
stuff stuff
stuff stuff *+ 2 *+ 2 a b a b 1 a b c d He!!o wor!d (a) He!!o wor!d ( a) He!!o wor!d (a) a Tb T c +1
8atriF
*lign character to left %teFt is aligned center by default' *lign character to center *lign character to right
a Tb T c +1
&,
6thers
Operation
7nfinity #artial !abla There eFists There does not eFist 5or all - bar $ambda bar 0eal part 7maginary part .eierstrass p 0e)ersed epsilon $eft arrow 0ight arrow "p arrow 4own arrow 4ots at bottom 4ots at middle 4ots )ertical 4ots diagonal upward 4ots diagonal downward
)ommand i2(i2it4 or i2(t4 partial 2abla exists 2otexists (orall hbar lamb%abar re im 5p
bac+epsilon
(isplay or #
"
le(tarro5 rightarro5 8parro5 %o52arro5 %otslo5 %otsaxis %otsvert %ots8p or %ots%iag %ots%o52
or
&5
Caution
7n locali/ed )ersions of .riter( the mar+up names of ree+ and special characters are locali/ed. 7f this document is not locali/ed to the same language( then the names below ma2 not wor9 for input. You may still use the 9ymbol catalog %5igure D' to select the desired character by its glyph. This will also display the charactercs locali/ed mar+up name. ;nce entered( the characters will display properly in any language. Contrary to commands( special characters are case sensiti)e.
Characters P #reek
7talic characters can be obtained by adding an i after the per cent character. 5or instance( %iPI instead of %PI . X*$#-* X:=T* X$*814* X#7 X#-7 Xalpha X)arepsilon Xiota XFi X)arrho Xphi X1=T* X=T* X *88* XT-=T*
X4=$T*
X=#97$;!
X7;T* XJ7
XT*" X;8= * Xdelta Xtheta Xmu X)arpi Xtau Xpsi
X6*##*
X8" X0-;
X!"
X97 8*
X;87C0;!
X"#97$;!
XC-7
X#97
$ Xgamma Xeta Xlambda Xpi
Xbeta
X/eta X+appa Xomicron Xsigma X)arphi
X)arsigma
Xchi
Characters P @pecial
9ome special characters correspond to the same symbol as an operator but there is no syntaF )erification %presence of left or right elements'. %pertho8sa2% %2oeleme2t Q %a2% / %i%e2ti#al ? %te2%to %i2(i2ite %or 0 %stri#tl4greatertha2 < %eleme2t ' %a2gle %2ote=8al 7 %stri#tl4lesstha2 9
&7
alig2l Y left alignment alig2m Y %centered )ertical alignment' 12 alig2r Y right alignment alig2t Y %top )ertical alignment' 12 a2% Y logical operator and approx Y sign approFimately( two _ one o)er each ar##os Y function arc cosine ar##ot Y function arc cotangent ar#osh Y area hyperbolic cosine ar#oth Y area hyperbolic cotangent ar#si2 Y function arc sine ar#ta2 Y function arc tangent arsi2h Y function area hyperbolic sinus arta2h Y function area hyperbolic tangent ba#,epsilo2 Y upside down epsilon. bar Y add bar to neFt character. bi2om Y put 2 elements one o)er each bla#, Y blac+ color for ccolorc bl8e Y blue color for ccolorc bol% Y bold font boper Y neFt character is treated as a binary operator %unchanged si/e' breve Y half circle turned up bslash Y operator [( as difference #%ot Y operator c.c for multiplication #he#, Y upside down circumfleF accent #ir# Y croundc operator for composition of functions #ir#le Y add a circle o)er neFt character #olor Y set color& blac+( blue( cyan( green( magenta( red( white( yellow #opro% Y coproduct %upside down e' or direct sum #os Y function cosine #osh Y hyperbolic cosine #ot Y cotangent #oth Y hyperbolic cotangent #s8b Y centered subscript #s8p Y centered superscript #4a2 Y cyan color for ccolorc %%%ot Y add three points o)er& triple deri)ati)e in physics %%ot Y add two points o)er& double deri)ati)e in physics %e( Y eEual sign with 4=5 o)erwritten %iv Y di)ide sign c&c with c2c in the middle %ivi%es Y operator f %9heffer bar'( same as logical sign dorK %larro5 Y left double arrow %lrarro5 Y left and right double arrow %eEui)alent'
12 These obsolete shortcuts are for alignbottom( align-mid and align-top( %)ertical alignments'. Math recogni/es them( but nothing is changed. Math commands - 8eference
&;
%ot Y add a point o)er& deri)ati)e in physics %otsaxis Y align ... hori/ontally in the middle %ots%iag Y align three points with a O<Gg slop %ots%o52 Y align three points with a 2<Gg slop %otslo5 Y align ... on the bottom %ots8p Y align three points with a O<Gg slop %otsvert Y align )ertically 3 points %o52arro5 Y down arrow %rarro5 Y right double arrow %imply' empt4set Y empty set e=8iv Y eEui)alent %eEual sign with three stri+es' exists Y there eFist %re)ersed =' exp Y eFponential function (a#t Y factorial function %add cHc after' (ixe% Y font attribute (o2t Y select a font (orall Y whate)er %upside down *' (rom Y goes with ctoc for limits of integrals( sums( etc. (82# Y transforms a )ariable in function ge Y greater or eEual( hori/ontal dTK sign gesla2t Y greater or eEual( obliEue dTK sign gg Y much greater then cSSc grave Y add a gra)e accent gree2 Y green color for ccolorc gt Y operator plus grand Eue hat Y add a circumfleF accent hbar Y stri+ h %h'( reduced #lanc+Ks constant %di)ided by h' iii2t Y triple integral( three times integral sign ii2t Y double integral( twice integral sign im Y function imaginary part i2 Y is element of i2(i2it4 Y infinity symbol i2(t4 Y infinity symbol i2t Y simple integral i2terse#tio2 Y intersection operator ital Y italici/ed font itali# Y italici/ed font lamb%abar Y stri+e lambda la2gle Y R to open cR...Sc %angular brac+et operator& langle ... mline ... rangle' lbra#e Y )isible left brace cUc l#eil Y left sEuare brac+et without bottom l%bra#,et Y double left sEuare brac+et l%li2e Y left double line %norm' cffc le Y less or eEual( hori/ontal dTK sign le(t Y neFt character is treated as an opening brac+et le(tarro5 Y left arrow lesla2t Y less or eEual( obliEue dTK sign l(loor Y left sEuare brac+et without top lim Y limit operator
limi2( Y inferior limit operator lims8p Y superior limit operator li2t Y line integral %with a circle' ll Y much lower than operator lli2e Y left bar to open absolute )alue cfc lli2t Y double line integral %with a circle' llli2t Y triple line integral %with a circle' l2 Y function natural logarithm log Y function decimal logarithm ls8b Y left subscript ls8p Y left superscript lt Y operator less than cRc mage2ta Y magenta color for ccolorc matrix Y defines a matriF mi28spl8s Y cOc sign( plus under c2c mli2e Y )ertical line cfc %angular brac+et operator& langle ... mline ... rangle' 2abla Y nabla operator( upside down i. 2bol% Y not bold font. 2%ivi%es Y does not di)ide operator( / )ertically stro+ed 2eg Y operator no 2e= Y operator different 2e5li2e Y new line 2i Y in)erted sign is element of 2itali# Y not italic font 2o2e Y combined with cleftc or crightc to indicate in)isible left or right brac+et 2oti2 Y is not element of operator 2root Y nth root 2s8bset Y is not strictly include in operator 2s8bsete= Y is not include or eEual in operator 2s8pset Y re)ersed is not strictly include in operator 2s8psete= Y re)ersed is not include or eEual in operator o%ivi%e Y operator / in a circle o%ot Y operator c.c in a circle omi28s Y operator cc in a circle oper Y transforms neFt )ariable in a large operator with limits %li+e j' opl8s Y direct sum operator( O in a circle or Y logical operator or( upside down W ortho Y orthogonal operator( perpendicular symbol otimes Y tensor product operator( F in a circle over Y di)ision operator( to write di)ision with hori/ontal fraction bar overbra#e Y put neFt element o)er pre)ious one with an hori/ontal brace overli2e Y add an hori/ontal bar o)er neFt element overstri,e Y stri+e2through characters o52s Y re)ersed is element of parallel Y parallel operator cffc partial Y round d for partial deri)ati)e pha2tom Y in)isible element( to let empty space
,%
pl8smi28s Y operator cO2c with cOc o)er pro% Y product operator( e prop Y proportional operator ra2gle Y cSc to close cR...Sc %angular brac+et operator& langle ... mline ... rangle' rbra#e Y )isible right brace r#eil Y right sEuare brac+et without bottom r%bra#,et Y double right sEuare brac+et r%li2e Y right double line %norm' cffc re Y real part function re% Y red color for ccolorc r(loor Y right sEuare brac+et without top right Y neFt character is treated as a closing brac+et rightarro5 Y right arrow rli2e Y right bar to close absolute )alue cfc rs8b Y subscript rs8p Y superscript sa2s Y font option seri( Y font option setD Y set of compleF numbers setmi28s Y operator [( subtraction of sets setL Y set of natural numbers setW Y set of rational numbers set; Y set of real numbers setV Y set of integers sim Y operator eEui)alent( write one _ sime= Y operator similarly eEual( write a double _ si2 Y function sine si2h Y function hyperbolic sine siGe Y change font si/e slash Y operator slash c/c s=rt Y operator sEuare root sta#, Y define a stac+ of elements separated with cZc
s8b Y subscript s8bset Y strictly include operator s8bsete= Y include or eEual operator s8m Y sum operator( j s8p Y superscript s8pset Y re)ersed strictly include operator s8psete= Y re)ersed include or eEual operator ta2 Y tangent function ta2h Y hyperbolic tangent function til%e Y add a tilde c_c o)er neFt character times Y multiplication operator( cJc to Y goes with cfromc for limits of integrals( sums( etc. to5ar% Y arrow to the right tra2sl Y 2 small Ioined circles( the one of the left is filled %sign of correspondence 7mage from' tra2sr Y 2 small Ioined circles( the one of the right is filled %sign of correspondence ;rigin of' 82%erbra#e Y put neFt element under pre)ious one with an hori/ontal brace 82%erli2e Y add an hori/ontal bar under neFt element 82io2 Y union operator( " 8oper Y neFt character is treated as a unary operator %unchanged si/e' 8parro5 Y up arrow ve# Y add a small arrow o)er neFt character 5hite Y white color for ccolorc 5i%ebslash Y operator with a big c[c 5i%ehat Y add an hat o)er neFt element 5i%eslash Y di)ision operator with a big c/c 5i%etil%e Y add a tilde on neFt element 5i%eve# Y add an arrow o)er neFt element 5p Y .eierstrass p function 4ello5 Y yellow color for ccolorc
,)
*ndeA
brac+ets %8ath' 1D brac+ets commands %8ath' G< function commands %8ath' G1
3
-elp system A
C
characters special %8ath' GC characters ree+ %8ath' GC chemical formulas <0
*
7nternational 9upport A
5
licensing of $ibre;ffice D limits to sum/integral 21 mathematical and chemical eEuations 11 mathematical mar+up 1G mathematical symbols 13 matriF mar+up %8ath' 1D miscellaneous commands %8ath' GB
+
deri)ati)e mar+up %8ath' 22 4ocumentation A
$
eEuation numbering 2D eEuation editor 11 brac+ets 1D deri)ati)e mar+up 22 =lements window 13 eEuations o)er more than one line 21 floating window 3< font si/e 2< formula layout 1D limits to sum/integral 21 mar+up 1G matriF mar+up 1D right2clic+ menu 1G
:
numbering eEuations 2D
6
;pen 9ource 7nitiati)e %;97' D
2
relational operator commands %8ath' <D
@
support B
F
formats commands %8ath' GA formula editor 9ee& eEuation editor 3< formula layout 1D
;
unary / binary operator commands %8ath' <C "ser guides A
,<