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 superuser.com/questions/290197/how-to-change-the-font-of-all-equations-in-libreoffice-writer).

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
            o(i).ExtendedControlOverEmbeddedObject.update()
        endif
    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

Tags:

libreoffice english


Related posts:
Zotero
Freeing (a little bit) my mobile
Purism, an open mobile