Free Online Training Courses

Category: Math

  • Math Quiz

    This quiz is designed to test your knowledge of the contents of the LibreOffice Math Application, part of the Office Software Suite series.
    [the_ad id=’13545′]
    There are twenty questions. The pass mark is 70 out of a potential 100 points, 5 for each question.

    Once you are satisfied with your answers, complete your name and email address and select “Submit Quiz“ to have your answers marked.

    You will shortly receive an email advising you of your score, whether you have passed the quiz, and how your answers have been scored. It will also include your Free Online Training course quiz completion Certificate for the appropriate quiz.
    [qsm quiz=11]

    [the_ad id=’13545′]

  • Math – Import and Export

    Export as PDF

    In Math, we can export a formula as a PDF document. To export as a PDF, click on ‘File’ from the main menu bar. From the resulting drop-down, click on ‘Export’. This opens the ‘Export’ dialog box.
    [the_ad id=”12355″]
    [show_slider name=math-import-and-export]
    [the_ad id=”12356″]
    In this dialog box, we can browse to the folder where we want to save the file and thus select the appropriate location. To change the name by which the file will get saved, just enter the new name in the ‘File Name:’ field.

    Also, in this dialog box, under the ‘Save as type:’ field, select ‘PDF’. After making these changes, click on ‘Save’. This will save the PDF file to the location which has been specified and under the given file name.

    Export as MathML and other File Formats

    In Math, in addition to exporting documents as PDFs, we can also export the formulas as MathML. MathML is a very useful file format but unfortunately all the browsers do not follow this standard perfectly. So if there are any faults in the display of the files, the fault lies with the browser being used.

    Now, to export as MathML, click on ‘File’ from the main menu bar. From the resulting drop-down, click on ‘Save As’. This opens the ‘Save As’ dialog box. In this dialog box, choose MathML from the list of available file formats under ‘Save as type’. Now click on ‘Save’ to save your formula as MathML.

    Other than MathML, we can export files in LibreOffice Math in XHTML, Flat XML and the different Microsoft file formats.
    [the_ad id=”12397″]

  • Math – Customization

    Formula editor as a floating window.

    The formula editor can cover a large part of the Writer window. In Writer, it is possible to turn the formula editor into a floating window. To convert the formula editor into a floating window hover the mouse over the editor frame. Now hold down the ‘Control’ key from the keyboard and double-click. The formula editor will get converted into a floating window.
    [the_ad id=”12355″]
    [show_slider name=math-customization]
    [the_ad id=”12356″]
    The floating window can be restored back into its original position again by using the same steps. Hold down the ‘Control’ key and double-click the window frame.

    Customizing the Catalog

    If we need to use a symbol that is not available in Math, we can add this symbol to the catalog. To add a new symbol to the catalog, first of all click on ‘Tools’ from the main menu bar and from the resulting menu, click on ‘Catalog’. This will open the ‘Symbols’ catalog.

    In this dialog, click on the ‘Edit’ button and this will open the ‘Edit symbols’ window.

    In the ‘Edit Symbols’ window, the symbols are arranged in symbol sets. In the lower part of the window, choose an available set for the new symbol from the ‘Symbol set’ list, for example the Special set. We can also type the name of a new symbol set directly into the box. Now from the ‘Font’ list, choose a font that contains the desired symbol. When we have selected a font, its characters appear in the font summary window. We can scroll through it using the scrollbar at the side, or use the ‘Subset’ list to go straight to the place we need.

    Here, we are going to choose the font ‘Raavi’ and the subset ‘Gurumukhi’. Now click on the desired symbol. It appears enlarged in the right-hand preview box. Make sure that the symbol set is set to Special. In the ‘Symbol’ field, enter a name for the symbol, for example ‘Punj’. If the name is not already in use, the ‘Add’ button becomes active. Click on it and then click on ‘OK’ to close the dialog.

    Now the Symbol set view area shows the new symbol. It can be selected just like the other symbols, either from here, or by writing them directly into the equation editor in the form ‘%Punj’.

    Space at the end of a formula

    The grave accent ` inserts a small additional space into the formula; the tilde ~ inserts a larger one. In the basic installation, these symbols are ignored when they occur at the end of a formula.

    However, when working with running text, it may be necessary to include spacing at the end of formulas as well. This customization is only available when you are working with a Math document, and not when you are embedding a Math object.

    To insert a space at the end of a formula, click on ‘Tools’ from the main menu bar and from the resulting menu, click on ‘Options’. This will open the ‘Options’ dialog box. In this dialog box, choose LibreOffice Math and on the Settings page, uncheck the option ‘Ignore ~ and ` at the end of the line’.

    Application to chemical formulas

    Math was designed to build mathematical formulas, but it can also be used to write chemical formulas. Below are some examples of chemical formulas.

    Empty braces after ‘2-’ are necessary to avoid errors as there is no right member after the minus sign.

    ‘lsub’ or ‘lsup’ are abbreviations for left subscript and left superscript.

    For reversible reactions, there are no satisfactory double arrows in Math. If we have a font with a correct symbol, we can customize the catalog to save the symbol. DejaVu fonts have these double arrows ⇄ ⇆ ⇋ ⇌. Otherwise, we can find a special character in a document and copy it.
    [the_ad id=”12397″]

  • Using Math With Calc, Impress and Draw

    Graphical properties.

    Formula objects have similar properties in Calc, Impress, and Draw. They are always inserted with a transparent background and without borders. In Draw and Impress, they are assigned the Default graphical style; there is no assigned style for them in Calc and properties need to be specified explicitly.
    [the_ad id=”12355″]
    [show_slider name=using-math-with-calc-impress-and-draw]
    [the_ad id=”12356″]

    A formula can be positioned anywhere. We can use the mouse or the arrow keys to position a formula.

    Combining formulas with text

    Since a formula is an OLE object, we cannot insert it into the content of a spreadsheet cell, graphic or presentation object. Thus, unlike in Writer, we cannot integrate formulas with running text. Instead, we can write the text directly into the formula. An example has been shown below.
    [the_ad id=”12397″]

  • Using Math With Writer Documents

    Numbering equations in Writer

    We can write numbered equations in Writer. Equation numbering is one of the Writer’s best hidden features. The steps are very simple.

    Start a new line in Writer. Type ‘fn’ and then press ‘F3’ from the keyboard.
    [the_ad id=”12355″]
    [show_slider name=using-math-with-writer-documents]
    [the_ad id=”12356″]
    The ‘fn’ gets replaced by the numbered formula:

    E = mc2 (2)

    Now we can double-click on the formula to edit it.

    Text Mode

    In Writer, large formulas should always be in a paragraph of their own, separated from the other text. When we use formula elements in running text, they can often be higher than the letter height. However, if it is necessary to place a formula within running text, we need to use the ‘Text Mode’.

    We can switch to the Text Mode by going into the equation editor and then clicking on ‘Format’ from the main menu bar and from the resulting menu, clicking on ‘Text Mode’. After switching on the Text Mode, Math will try to shrink the formula to fit the letter height. The numerators and denominators of fractions are shrunk, and the limits of integrals and sums are placed beside the integral/sum sign.

    This way the formula looks more like a part of the remaining text.

    Background, Border and Size of Formulas in Writer

    In the basic installation of Math, formulas have a transparent background and no borders. The size of a formula cannot be adjusted; in a Writer document it depends directly on the way the formula is constructed. So we can define the font size of the formula while creating it but cannot change it afterwards. The method for changing the font size of a formula has already been discussed in one of the earlier sections.

    Fast insertion of formulas

    If we know the markup of the formula, there is a faster method to build a formula in Writer. First of all write the formula markup in Writer. Then select this markup. Now insert the formula using the keyboard shortcuts. The creation and usage of keyboard shortcuts have been discussed in the Writer tutorials. This method avoids opening and closing the Math window and saves a reasonable amount of time.
    [the_ad id=”12397″]

  • Math – Changing The Appearance

    Adjusting spacing.

    To increase or decrease the spacing between the different elements of a formula, click on ‘Format’ from the main menu bar and from the resulting menu, click on ‘Spacing’. This will open the ‘Spacing’ dialog box.

    [the_ad id=”12355″]
    [show_slider name=math-appearance-of-formulas]
    [the_ad id=”12356″]

    In this dialog box, under ‘Spacing’, the spacing between different elements of an equation can be selected.

    In order to select the spacing between other types of elements, click on ‘Category’. This will list all the different categories of symbols in Math. Click on the required category and then make the required changes to the spacing between different elements for that category.

    After making all the changes, click on ‘OK’. This will implement the selected changes to the Math document.

    We can change the spacing between the different elements of a formula using this method. The elements which are getting affected using this method are highlighted in the preview area and so this makes working with the right elements very simple.

    Changing the alignment.

    We can also change the alignment of formulas in Math. In order to change the alignment of formulas in Math, click on ‘Format’ from the main menu bar and from the resulting menu, click on ‘Alignment’. This will open the ‘Alignment’ dialog box. In this dialog box, we can select among the different alignment types using the radio buttons which have been provided. After selecting the required alignment property, click on ‘OK’. This will change the alignment of the formulas appropriately.

    Changing the color.

    In Math, the command ‘color’ can be used to change the color of a subset of a formula: ‘color red ABC’ gives ‘ABC’. There are eight colors to choose between: white, black, cyan, magenta, red, blue, green, and yellow. You may give a color to a subset of a formula if it is gathered between { } or other parentheses. For instance: ‘A B color green {C D} E’ gives ‘ABCDE’. If several colors are used, the one the more inside the formula is applied, as in this example: ‘color blue {A B color yellow C D}’ gives ‘ABCD’.

    It is not possible to select background color: it is always transparent in Math.
    [the_ad id=”12397″]

  • Math – Appearance of Formulas

    Changing the font size.

    In LibreOffice Math, we can change the font size of the formulas. To change the font size of the formulas, click on ‘Format’ from the main menu bar and from the resulting menu, click on ‘Font Size’. This will open the ‘Font Sizes’ dialog box. In this dialog box, select the appropriate ‘Base size’ in order to change the font size of the formulas. After selecting the required value, click on ‘OK’. This will change the font size of the formulas.
    [the_ad id=”12355″]
    [show_slider name=math-appearance-of-formulas]
    [the_ad id=”12356″]

    Changing the font.

    To change the font of the formulas in Math, click on ‘Format’ from the main menu bar and from the resulting menu, click on ‘Fonts’. This will open the ‘Fonts’ dialog box. In this dialog box, under ‘Formula Fonts’, we can change the fonts for the various parts of a formula.
    To make more custom changes, click on ‘Modify’. This will display a list of the names of the various parts of a formula. Click on the one for which the font needs to be changed.

    This will open another dialog box. In this dialog box, under ‘Font’, select the required font for the selected part of the formula. After selecting the font, click on ‘OK’. This will return the control to the previous dialog.

    After making all the changes, click on ‘OK’. The fonts will get changed accordingly.

    [the_ad id=”12397″]

  • Math – More Formula Layouts

    Adding limits to a sum or an integral.

    In Math, the ‘sum’ and ‘int’ commands are used for sum and limits respectively. These commands can take the parameters ‘from’ and ‘to’. These are used for lower and upper limits respectively. These parameters can be used singly or together. The usage of these commands and parameters has been shown in the below given illustrations.

    [the_ad id=”12355″]
    [show_slider name=math-more-formula-layouts]
    [the_ad id=”12356″]


    Writing a derivative

    Writing derivatives in Math is very simple. We simply need to use a fraction.

    In other words, we need to use the ‘over’ command. Combine this with either the letter d (for a total derivative) or the ‘partial’ command (for a partial derivative) to achieve the effect of a derivative.

    The examples have been shown below.

    Markup characters as regular characters.

    In LibreOffice Math, the characters that are used for controlling the markup codes cannot be entered directly as normal characters. These characters are: ‘%’, ‘{’, ‘}’, ‘&’, ‘|’, ‘_’, ‘^’ and ‘”’. So, for example, we cannot write ‘2% = 0.02’ or ‘1″ = 2.56cm’. Two methods can be used to solve this problem:

    • Using double quotes to mark the character as text, for example ‘2″%”= 0.02’. Obviously this is not possible for the double-quote character itself.
    • Adding the character to the catalog. This will be discussed in detail in the later chapters.

    Text in a formula.

    To include text in a formula, enclose the text in straight double-quotes. All characters except double quotes are permissible in text. Unfortunately the special characters dialog is not available in Math. If necessary, we can write the text in a text document and copy it into the equation editor via the clipboard. In this way, special characters can also be inserted.

    [the_ad id=”12397″]

  • Math – Recognizing Functions

    In the basic installation, Math outputs variables in italics. If we enter a function, Math usually recognizes it and outputs it normally. If Math fails to recognize a function, we can inform Math about it by entering the markup code ‘func’ before the function. By using this code, the text following the code will be recognized as a function.
    [the_ad id=”12355″]
    [show_slider name=math-recognizing-functions]
    [the_ad id=”12356″]
    Some functions recognized by Math need to be followed by numbers or variables. If these are missing, Math puts an inverted red question mark ‘¿’ in their place, which we can only remove by correcting the formula: enter a variable or a number, or a pair of empty braces ‘{ }’ as a placeholder.

    An example has been shown below. The factorial function ‘fact’, when written without a variable throws an error.

    But when the variable is provided, the error gets removed by itself.

    Equations over more than one line.

    Suppose we need to make an equation covering more than one line, the simplest and the most conventional method we can think of is to simply press the ‘Enter’ key from the keyboard. However, if we press the ‘Enter’ key, although the markup goes to a new line, the resulting equation does not. We need to use the ‘newline’ command explicitly. This has been illustrated below.

    If it is required to continue the calculation on a new line without writing a complete new equation, this is not directly possible, because Math expects a term on the left hand side of an equals sign. We can substitute empty braces ‘{ }’ on the left hand side to achieve this. This has been shown in the below given illustration.

    Here the inverted ‘?’ appears because there is no tern on the left hand side of ‘=’.

    Here the equation shifts to the next line as empty braces have been used.

    Also, spacing between elements in formulas is not set by space characters in the code. We need to use special markup to add spaces: ` (grave) for a small space, ~ for a large space. Another solution would be to add space characters between quotes, to be considered as text.
    [the_ad id=”12397″]

  • Math – Formula Layouts

    Using Brackets in Formulas

    The most difficult part in using LibreOffice Math is when writing complicated formulas. This is because LibreOffice Math knows nothing about the order of operations. We need to use brackets in order to state the order of operations explicitly. Consider the example which has been shown in the below given illustration.
    [the_ad id=”12355″]
    [show_slider name=math-formula-layouts]
    [the_ad id=”12356″]

    Now consider the one shown below:

    These two examples make it perfectly clear as to how the order of operations needs to be set using brackets. The use of brackets changes the formula completely.

    The brackets belong solely to the layout of the markup code and are not printed. If you wish to print the brackets in the formula, you need to use the commands, ‘lbrace’ and ‘rbrace’. The usage has been shown in the below given illustration.

    LibreOffice Math also provides scalable brackets. This means that the brackets grow in size to match the size of the contents. We can use the commands left (and right) to make scalable brackets.

    Before using scalable brackets, let us see what happens when properly scaled brackets are not used. For this we need to write a matrix. A matrix has been written in the below given illustration. Rows are separated by two ‘#’s and entries within each row are separated by one ‘#’.

    As can be seen, the brackets are not properly scaled. Now when we use the left and right commands, properly scaled brackets will get printed.

    One important point which needs to be always considered is that Math expects that for every opening bracket there will be a closing one. If you forget a bracket, Math places an inverted question mark by the corresponding bracket. The inverted question mark disappears when all the brackets are matched. Sometimes forgetting a bracket causes the whole structure of the formula to fall apart.

    However, an unpaired bracket is sometimes necessary. In such cases, we have two options. With non-scalable brackets, we need to use a preceding backslash ‘\’ to indicate that the following character should not be regarded as a bracket but as a literal character. So the half-open interval ‘[a;b[’ is represented by ‘\[ a;b \[’.

    Scalable brackets can also be unpaired. The same half-open interval is represented by ‘left[ a;b right[’.
    For scalable brackets, you can also use the command ‘none’ to replace a non-existent paired bracket.