Multi-select Equations (Supposed: Math objects; Intention: Same changes of format properties for all of them.)

Is there a method for multi-selecting Equations (so I could reset the Font size for all)?

I created a document with a large number of Equations, and after pasting it to a template document which requires a different size font than what I used in my draft, the font size of the Equations need to be changed.

Unfortunately, no.

Equations inserted in Writer are “external” objects formatted by mechanisms different from Writer ones. From a broad perspective, they are not controlled by styles, neither in Math, nor in Writer (where “styles” have anyway an other target than the supposed goals of Math).

Changing equation appearance in Math is not easy either. And due to the lack of “transferable” styles, every equation must be handled individually (see the Math Guide).


PS: when asking here, always mention OS name, exact LO version and save format. This helps to take into account the subtle differences between platforms.

Math formulas are complete documents, mostly embedded into documents of a different LibO module via OLE. That’s basically different from ordinary shapes and frames.
There is an old Extension (FaF) which may help. I never used it myself and I don’t know if it still works with recent versions.
For my own purposes I had written user code following a different concept and it worked well. Now I didn’t use it for a year or more, and when I tested it again due to your request, I found that it still works as expected under versions of the 7. series, but not under V25.2.2. I didn’t yet find the time to get closer to the case and to find remedy.

what’s the added value compared to the 30 liner FAQ’s code ? :thinking:

I’m obviously too stupid to understand what you mean by “the 30 liner FAQ’s code”.
Related questions were actually asked more than once, but I never found a solution allowing the “workflow” I suggest:

  • Open your textfile with any number of math formulas.
  • Choose one of them which already has all the format seetings you want to be applied to the many (harmonizing is my term), or change its settings as intended for all the formulas for this single example.
  • Keep this one math formula selected making it “the template” this way and run my code.

If you have different documents for which you want different formatting for math objects, you can collect some simple examples somewhere else, and you can use each one as a template by temporarily pasting it into a document and run my code. This is, imo, what comes next to “formula styles”.

ok, thanks for clarifying.

Ask/Guide - How to use the Ask site - The Document Foundation Wiki #Are_there_any_answers_to_my_question_yet?

→ Change the size or font of all formulas - The Document Foundation Wiki

2 Likes

Meanwhile I took the time, but was confused by my observations …
However, a reworked and even simplified user code (about 50 lines in Basic) passed my tests for many versions starting with 7.3.6 and up to 25.2.2 (In older versions the API doesn’t know the used .Parent property of OLE shapes.)

You may play with the attached example, and take the code from there to a library of your choice.
harmonizeFormulas.odt (66.3 KB)