# Inserting a math equation to a LibreOffice presentation

In a LibreOffice Impress presentation (Version 5.1.4.2 on Ubuntu 16.04), when I click Insert -> Object -> Formula, I see a visual toolbar that lets me add elements of an equation such as fractions etc. However:

• The inserted formula is in a very small font (18 pt), and I do not find any way to enlarge it, neither within the formula editor nor outside it. Outside the editor, I can enlarge the font of the box, but it has no effect.
• It is very cumbersome to insert formulas through the visual editor. Is there a way to insert formulas in a plain text markup, like in Writer?

### TexMaths

TexMaths is an extension designed to provide LaTeX support in LibreOffice. LaTeX equations can be inserted as images (SVG or PNG formats) and the LaTeX code is saved into the image attribute for further editing. To insert your first equation into a document, simply type a LaTex math instruction in the text field of the TexMaths Equations window and then click on the LaTeX button. Example: x(t) = \mu ^2 (t) should produce the equation x(t)=µ²(t)

TexMaths is open source software licensed under the GPL.

### Installation

1. Install TexLive.

sudo apt-get install texlive texlive-binaries dvipng


3. Open LibreOffice Writer and install the TexMaths extension using the Tools -> Extension Manager menu.

4. Close and reopen LibreOffice Writer. You will see a four new TexMaths icons in the toolbar. Click on the TexMaths System Configuration icon and fill in the paths of your programs (usually /usr/bin for all).

### Usage

1. Run TexMaths by clicking on one of the TexMaths Equations icons. Clicking on the first Pi icon which is marked by a black arrow in the below screenshot will open a new TexMaths Equations window. You need to type a group of mathematical symbols in LaTeX format inside the TexMaths Equations window instead of typing it directly on the slide

Don't do it this way

Do it this way

Select either Display or Inline Equation Type. Display looks better than Inline

After the equation is added to the slide, you can drag it to its correct position on the slide.

2. There can be images of mathematical symbols and plain text mathematical symbols together in the same slide, as in the below slide where the large equation in the middle is an embedded image and the highlighted text is plain text.

### Examples

• The first link seems to be broken – M. Becerra Dec 12 '16 at 17:44
• This looks like a very useful extension, thanks! I installed it and configured the paths. However, when I select LaTeX text in Impress and click the leftmost icon, I get an error message "The selected object is not a TexMaths equation... Please unselect it and call the macro again..." I tried to select both simple texts such as "n" and longer texts such as "\frac{a}{b}" and I always get the same error. What am I doing wrong? – Erel Segal-Halevi Dec 12 '16 at 18:03
• Do you mean that I must create each equation in Writer, and then copy it to Impress? Is it impossible to create an equation directly in Impress? – Erel Segal-Halevi Dec 12 '16 at 18:16
• Strange... I still get the error "The selected object is not a TexMaths equation... Please unselect it and call the macro again..." – Erel Segal-Halevi Dec 12 '16 at 19:13
• I clicked the toolbar buttons when nothing was selected, and still got the same error. How can I get to the TexMaths Equations window? – Erel Segal-Halevi Dec 13 '16 at 8:08

You can easily control the size and color of equation objects in Impress (and any LO apps) using size and color. For example: Size 24 color blue { E = m c^2 }