Hi all
I have imported a Word document that contains many formulas, in OOo 2.4.1 on Ubuntu Hardy. For some reason, the base size on these equations is set to 32 pt in all cases, then the imported formula contains slightly strange context such as
size 12{ { dot {Q}} rSub { size 8{ ital "cv"} } = { dot {m}} \( h rSub { size 8{e} } - h rSub { size 8{i} } \) + { dot {W}} rSub { size 8{ ital "cv"} } } {}
When attempting to edit this, if I remove the 'size 12' from the start, the base size shows through, and the whole equation becomes much larger than I want.
How can I change the base size of all of the equations in my document?
Cheers
JP
[Issue] Set base size for all formula/math objects at once
[Issue] Set base size for all formula/math objects at once
Last edited by Hagar Delest on Fri Jul 25, 2008 5:15 pm, edited 1 time in total.
Reason: Tagged the thread as issue (link to a bug report).
Reason: Tagged the thread as issue (link to a bug report).
OOo 3.1.1 on Mac OS X 10.5, OOo 3.0.1 on Ubuntu 9.04
Re: How to set 'base size' on many formula/math objects at once?
By modifying them one by one. Math is the less developed component of OOo and its main flaw is the lack of styles. To change the base size you need to modify it on every equation one by one going to Format -> Font Size.jdpipe wrote:How can I change the base size of all of the equations in my document?
There are two types of people: those who believe that there are two types of people and those who do not.
openSUSE Leap with KDE Plasma / LibreOffice
openSUSE Leap with KDE Plasma / LibreOffice
Re: How to set 'base size' on many formula/math objects at once?
Is there any possibility that this could be automated using a macro, perhaps?
OOo 3.1.1 on Mac OS X 10.5, OOo 3.0.1 on Ubuntu 9.04
Re: How to set 'base size' on many formula/math objects at once?
FWIW this problem is arising becuase I am editing a word document that contains many formula that were probably initialy typed into powerpoint, hence the default size is 32pt on all formulae, but really I would like the default size to be 12pt as it is for the text in my document. I can imagine that many people working on lecture notes etc would see this sort of problem.
OOo 3.1.1 on Mac OS X 10.5, OOo 3.0.1 on Ubuntu 9.04
Re: How to set 'base size' on many formula/math objects at once?
It looks like it could be done easily by editing the XML text, if you have access to tools like sed or Perl.
If you want to try it, I can give you some specifics. Or, if you want to email me the file, it would take less time for me to do it than to explain it See my profile/interests for email.
If you want to try it, I can give you some specifics. Or, if you want to email me the file, it would take less time for me to do it than to explain it See my profile/interests for email.
AOO4/LO5 • Linux • Fedora 23
Re: How to set 'base size' on many formula/math objects at once?
Hello,
Hopefully no, you just need a macro, as proposed on french FAQ. I could not find it on English FAQ?RGB wrote:By modifying them one by one. ... To change the base size you need to modify it on every equation one by one going to Format -> Font Size.
LibO 3.6.7.1 on Win7
- Hagar Delest
- Moderator
- Posts: 32628
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: [Issue] Set base size for all formula/math objects at on
For those afraid of French:
You can subscribe and vote for that report (up to 2 votes per issue): Issue 5092 - formula styles.
Macro to change all the formulas at once:
Change the element.BaseFontHeight = 14 value to suit your need.
NB: I just tried it and the results are not so good. Formula frames are not resized and not all the formulas are updated!
You can subscribe and vote for that report (up to 2 votes per issue): Issue 5092 - formula styles.
Macro to change all the formulas at once:
Code: Select all
Sub Main
embeddedObjects = ThisComponent.getEmbeddedObjects()
elementNames = embeddedObjects.getElementNames()
for i=0 to UBOUND(elementNames)
element = embeddedObjects.getByName(elementNames(i)).Model
if (element.supportsService("com.sun.star.formula.FormulaProperties")) then
element.BaseFontHeight = 14
element.FontNameVariables= "Arial"
element.FontNameFunctions = "Arial"
element.FontNameNumbers= "Arial"
element.FontNameText= "Arial"
endif
next i
ThisComponent.reformat()
End Sub
NB: I just tried it and the results are not so good. Formula frames are not resized and not all the formulas are updated!
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Re: [Issue] Set base size for all formula/math objects at on
There's a dmath extension - and it can fix the size of all the formulas in the selection (but selection could not have tables). To do it this way - You should install dmath, a lot of toolbars will pop up, of which You'll need a button with two-side arrow, like the green one in right of the screenshot:
LibreOffice 4.1.2.3 on Kubuntu 14.04