[Solved] Default math font size?
[Solved] Default math font size?
Can i a specify the default math font size?If yes then will be grateful if someone explains me how.Genuine replies are appreciated.
Last edited by MrProgrammer on Sun Jul 19, 2020 5:24 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Reason: Tagged ✓ [Solved]
«Removed by moderator»
Re: Default math font size?
Menu path >Format>Font Size...
Genuine enough?
Genuine enough?
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München
Re: Default math font size?
Assuming your answer was "no" because you wanted to set the .BaseFontHeight to a different value for all your newly created OLE objects containing a Math component, I took the opportunity to ask the generalised fundamental question concerning the topic in a different forum where I expeced a specific developer to expose his knowledge - and he did.
See https://ask.libreoffice.org/en/question ... ts-stored/.
Because the question was of some general interest for me (though not needing an answer since I mostly use some collecions of formulas as template surrogates) I also wrote a little macro usable to insert a formula into a Writer document setting the respective property at the same time. In fact I wouldn't recommend it for actual use in the current state because no precautions concerning the vertical alignment are taken so far. If interested you may study the code below. (Only tested with LibO V 6.2 and with AOO V 4.1.5)
See https://ask.libreoffice.org/en/question ... ts-stored/.
Because the question was of some general interest for me (though not needing an answer since I mostly use some collecions of formulas as template surrogates) I also wrote a little macro usable to insert a formula into a Writer document setting the respective property at the same time. In fact I wouldn't recommend it for actual use in the current state because no precautions concerning the vertical alignment are taken so far. If interested you may study the code below. (Only tested with LibO V 6.2 and with AOO V 4.1.5)
Code: Select all
Sub insertFormulaSettingBaseFontHeight(Optional pBFH As Long)
REM You may also want to adjust the position. More insight needed.
REM You can simplify the the parameter handling for use in LibO.
If IsMissing(pBFH) Then
bfh = 8 REM For testing!
Else
bfh = pBFH
End If
doc0 = ThisComponent
doc0Frame = doc0.CurrentController.Frame
dispatchHelper = createUnoService("com.sun.star.frame.DispatchHelper")
dispatchHelper.executeDispatch(doc0Frame, ".uno:InsertObjectStarMath", "", 0, Array())
eos = doc0.EmbeddedObjects
u = eos.Count - 1
eo = eos.getByName(eos.ElementNames(u))
fo = eo.Model
fo.BaseFontHeight = bfh
doc0Frame.activate
End Sub
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München