It is annoying to change the font size of equations in a LibreOffice document when you have to do it for a lot of equations because they are not affected by the size of the text. One way of doing this is with the macro below (I got it from

Sub FormulaFontSizeChanger
    f = InputBox("New font size:", "BaseFontHeight", 9)
    o = ThisComponent.getEmbeddedObjects()
    For i = 0 to o.count-1
        if (not IsNull(o(i))) and (not IsNull(o(i).Model)) then
            o(i).Model.BaseFontHeight = f
            o(i).Component.BaseFontHeight = f
    Next i
End Sub

To use it on LibreOffice Writer go to menu Tools → Macro → Organize Macros → LibreOffice Basic. Then, click Organizer and New... Paste the code above and save. Your macro is created. Now, menu Tools → Macro → Run Macro and find it.

About this post

Date: 01 Jul 2016

Author: Leonardo Barichello


libreoffice english

Related posts:
Clementine, a great music player
Hambleton bakery
Probably the best Beef Wellington in London


Subscribe to my RSS: