45

How to insert equations or formula while writing notes in Libre Office?

user26567
  • 551
  • 1
  • 4
  • 3

6 Answers6

56

The most basic answer to your question is Insert -> Object -> Formula in LibreOffice Writer.

Kaobear
  • 735
  • 5
  • 9
  • 6
    Out of curiosity, do you have any idea why the math formula in libreoffice does not adapt Latex syntax? If it does then it's much easier to copy and use the countless, readily-available latex equations from the web! – user22363 Nov 30 '16 at 22:16
  • I was wondering, is Libreoffice able to calculate the math expression and insert the result? For example can it calculate 10 times 5 = and automatically append the result? – Shayan Oct 10 '22 at 11:26
32

A more detailed answer: If you use this feature a lot (I'm a math teacher, I use it a lot!) you can add a button to the toolbar to take you directly to the formula editor. There is a GUI input method, but you can also use a sort-of command line version where you enter the code for the expression as text in your document, then highlight it and select Insert Formula. As an example, this

 x={{-b +- sqrt{b^2 -4ac}} over {2a}}

will turn into this

Quadratic Formula

Here's the a screenshot: (Notice the first symbol on the tool bar - that's where I've place the Insert Equation button.)

enter image description here

Marc
  • 9,980
13

Alt+I, O, F comes handy

There after a formula editor panel will be displayed.

Once you finished press

Esc

it will close the formula editor

A.B.
  • 90,397
A Umar Mukthar
  • 785
  • 2
  • 9
  • 32
12

Install the TexMaths extension (Tools > Extension Manager). You will need to click on Get more extensions online... search for TexMaths in the online repository download and install (usually double-clicking the file will open LibreOffice for installation). Restart LibreOffice and the TexMaths should appear in the toolbar.

Latex installation is also required:

sudo apt install texlive texlive-binaries dvipng

Please note that when you are using the TexMaths extension, you should always use the .odt format to save your files. Microsoft office does not support .svg images.

Also configure TexMaths to use scalable vector graphics (.svg) with this format your equations will always print crisp/sharp no matter how big or small you make them on the page. Do not use .png as the print quality will never be as good as .svg.

Zanna
  • 70,465
  • 1
    this is the best answer for people working with LaTeX and presentations. I think also the basic formulas should adhere to the TeX syntax. It's better to start learning it from the beginning, it will be useful for the future. – Santiago Nov 17 '19 at 11:30
  • Just a small typo: the package is called dvipng. Apart from this, great answer! – Cleb Jul 26 '20 at 21:05
  • one problem with this solution is that text mode in libreoffice Impress is not compatible with OLE objects, so it's impossible to insert, for example, fractions in text mode with the texmaths extension in libreoffice impress. This seems like a huge oversight! – gannex Feb 02 '24 at 00:40
2

Formula bar will be grayed out and unclickable, until you install LibreOffice Math. It will "unlock" your formula bar. The Math icon cannot be found/placed on desktop or all application menu. It is used as extension to use formula bar. That's because the LibreOffice Math software is very useless - can only type some formulas,but not text and things from "insert" menu. But as I said, it "unlocks" formula bar from LibreOffice Write, Presentation, Calc and Draw.

So go to Ubuntu/Unity/Gnome Software (it depends on your operating system) and type "LibreOffice" . Than select "LibreOffice Math" from the suggested search bar. Then install it.

Your formula bar is now useable and clickable!

After you click it, you will see a some kind of LibreOffice Math, but inside LibreOffice Write, Calc, Presentation or Draw. By using operations in your right you make your own equation. The operators will make little boxes where you write letters and numbers.

2

Use the Dmaths add-on, which enables you to type the equation directly into the text

e.g. : You would like to type an integral from a to b of f(x) dx, you just type " a;b;f(x) " ( without quotes ) and you type the short-cut "ctrl+shift+i" and there it is.

I'm a math teacher and this is how I type all the equations I need.

There's another add-on that acts the same way called Cmath, but the first one is the most complete because you can also draw simple 3d figures, do plane geometry, and different other stuff.

Paul Tanzini
  • 3,927
  • 1
    You could add that it's not free (13 euros). Not that I'm against it but just to distinguish it from Libreoffice in general. Cmath is free by the way. – ThePhi Apr 15 '18 at 15:40