Trying to understand how math font selection works

Due to age and long retired from my profession as a teacher, I’m no longer a frequent user of the Math component of “our software”. I’m still interested, however, in a sense.
A few (only 8) years ago I even posted a related question with the intention to “answer” it myself making an offer: There was a bait trying to initiate development. See How to get better scalable bracket?, tdf#32362, and tdf#39750.
As far as I can tell, the only recent improvement (announced for 2024-02-DD) to Math was to enable it to create formulas shown in RTL mode, and using Arabic sripts.

Let’s hope the author will also start a revival of Math regarding the old bugs.

BTW: Do you know the TexMaths extension. I’m not any longer eager to study LaTeX for the purpose, but I’m interested in examples.

See also: tdf#101174 (it will be possible to choose fonts other than OpenSymbol in v24.2).

Thanks to Khaled Hosny.

Eager to learn if there will also be an OpenSymbol font then allowing a smart scaling of square and curly brackets.

yes, i know. I don’t prefer to use this. I used a lot of inline-equation in my text and the LO math provides ‘faster’ approach for me.

So these operators, how to set the font? is it in function/variable/ custom fonts in the LO math font selection? It seems not yet implemented in the current version…

If you not yet read it this ask thread may be of interst for you. My contribution there also contains some links to different related threads.

I’m afraid any really sustainable layouter for mathematical formulas will need to do a lot in a similar way as TexMath does it. If this can also offer support for existing Math formula syntax or what automatic conversions can be implemented, I can’t tell.
… …
Taking the risk again to open the horizon, I would suggest thinking about whether we (the worlds math users of today) should make a visual representation of mathematics developed centuries ago the standard for the millennia to come. For example: We are still suffering from an approximately 3500 year old decision to divide by the sexagesimal system. Let’s learn from it. …

1 Like

Hi all,

Mr. Lupp, Thank you for pointing those informations.

I will summarize this information and give some pointer for future development.
LO writer is really good, I am now writing my PhD thesis using Writer (+ a lot of LO math within it).

It is a pity LO math is not actively updated as Writer did.
But I really hope.

If i have ability as developer, i would help, but i don’t have (i know python only).
Perhaps i can help with manual and giving some guidelines.

The work of Khaled Hosny looks promising.

best regards,
Tetuko

You could then also consider writing your thesis in Jupyter notebook format!
https://jupyter-notebook.readthedocs.io/en/stable/ui_components.html

LaTEX | Mathjax equations
you may also use matplotlib, numpy and sympy in that »Environment«

Math isn’t bad, however. It just isn’t quite “state of the art” currently.

If your concept of “inline formula” is as I would understand it, you may be interested in the attached example demonstrating the automatic conversion (rendering) of inline formulas to Math OLE objects.

(No. The example is not written in Python. It’s too provisional for that noble language.)
nextExampleMathInlineFormulas.odt (38.7 KB)

Thank you.
Currently, I’m not considering making any extreme switch.

I completely agree.

I think I have read your post previously perhaps more than once, thank you for the sharing the file.
To be honest, I have not tried it myself because i still don’t know Macro and has not got the time to learn it. But definitely one thing that I will try in my spare time.

@ajlittoz @Lupp @mikekaganski
Thank you very much for all the inputs.

I try to sum up our discussion. Here is what I got:

  1. Font issue as in this post: LO should be able to detect if a variant of a font is not available. At least let the user know about it. Although I prefer LO math does not allow selection of unavailable variant.
    Reason: it is misleading, especially for beginners. Not allowing will also “educate” the user, such as myself in this case.

  2. It is convenient to use math-object for all math-variable in the text (as inline eqn) because it provides consistency everywhere in the text and not affected by style of the paragraph. For example a variable %alpha_1, i will use LO-math throughout the text, even tough it is possible to use symbol alpha and subscript 1.
    I think it is the norm nowadays, as the other authors do the same.

So the ability to change all LO-math font & font size in the text at the same time should be there, without the need of extension or macro. A basic need.

Note: Word-math also has issue with this. In theory was easy, but when there’s a lot of equations it is not easy to change font all together, and I have to check and change one by one. The LO math extension actually works better in this case.

Below are more “imaginary” and probably more work to it. It is related to what @Lupp post.

  1. LO math is outdated compared to Word’s and Google Docs’s math because it returns an image and was designed as a separate app.

One advantage of LO math is that we can always edit the code, which is impossible in Word and Gdocs after the equation is printed. You can only write math in using code once in the beginning.

I imagine to return non-image formula would be a very far future project.
But to be able to go back on forth to the formula editor is the key here.
How to make it more straightforward, would be useful for text using plenty of formulas.

Instead of opening LO-math each time we write/edit a formula in writer, why not keep the formula-editor there inside the writer, for example in a special mode “math-mode”. Every time the text cursor is next to the math object (image), we can see the code appear in the formula-editor, then we can press something to be automatically in the formula-editor or back to text.

I don’t have enough knowledge on this matter.
The auto-scaling of inline-formula in Latex (as far as i remember) and Word works pretty well, for example when you write a fraction in inline-formula. I guess this is not possible when LO math still returns an image.
But we should go to this direction.

If you think, I should post a request/bug in the bugZilla. (if one of those ideas is good enough). Please let me know.

Let me dream aloud (I am not a developer).


Designing formulas in a separate app is certainly a good thing. That this separate app looks integrated in Writer (and other LO components) is only a matter of implementation and user interaction procedure (designed in the GUI).


I do agree that it would be nice to control visual/typographic aspects from within Writer. This is where I begin to dream awake. The basic tool for this in Writer is styles. So, the right track would be to implement a new style category for Math, as feature-rich and versatile as those in Writer. To make things easy, this new style should be configured in Math (so that it is also available in the other components Calc, Impress, Draw, …). When the Math object is imported into Writer, its styles are also imported. Then Writer should be extended to be able to interpret the Math styles.


In this scheme, you still need to go to Math to modify your styles (because it is easier than modifying all components to interact with Math styles, unless of course developers can find a way to share the Math styles code).


There is also another needed feature: referencing Math objects. As an example, take your %alpha_1 single-variable formula. If it is interspersed in text in multiple locations, I’d like it to be a reference to a single object, so that if I need to change it to %beta_n I do it only once and all occurrences are changed simultaneously.


To make this dream come true, we need a solid rigorous specification coexisting peacefully with ODF.

1 Like

This again makes me doubt if we are talking of the same thing using the words “scaling” or “inline-formula” or “image” in the given context.
As I remember it (currently no ‘Word’ available here) Word's included version of MathType always showed an image by default , and this image was exported to different applications (Writer, web browsers) when opening a Word document with equations. (At least I had to set anew hundreds of formulas when I abandoned Word and moved to StarOffice in about 1999.)
Concerning the term inline-formula: To my understanding this must be plaint text coming with any kind of markup telling the editor (probably/wishable) and an extension/macros (surely) the fact “This is intended to finally be shown graphically as a formula if it goes to a printed version”. The examples contained in the document “nextExampleMathInlineFormulas.odt” already attached to a previous comment of mine were of this kind using the shorthand markup-parentheses $. (left) and .$ (right). That attachment also contains an actually working very short (30-liner) macro from my toolbox for the conversion from “inline” to “rendered”. (A revese macro would be very simple, but ´was not provided there.)
Anyway: A typesetting application using inline markup for mathematical formulas needs to be “free” in its ways to position (and anchor and align and…) the resulting graphical elements when creating a printable view of the document or must be told explicitly in what way the author wants to get it done in the given case. An example demonstrating this problem and a very raw first approach to its solution is the “large” formula contained in a TextFrame.

I don’t think developers are blind concerning the Math component (which is “independent” anyway as far as components of a monolithic application can be), and one of the well known ones (@mikekaganski) already posted a comment to this thread. Two reasons may be relevant for the lack of development:

  • Missing human resources.
  • Doubts in the probably outdated concept of Math (specifically concening the ‘OpenSymbol’ approach.
    An actual specification, however, should be based on very profound knowlege.

Hi Lupp, thank you. I am sure we are talking the same thing: In-line formula.
The current version of word doesn’t use math type anymore, and it does return text instead of an image.
If you don’t have word, try it in google-docs, it is similar but less developed.
There you can type with using latex command, press space/enter you get the equation printed as text.
But there is no way to edit the latex command, only edit manually (a caveat).

I’ll respond to other comment later…

I got noice of that, but don’t understand

Even Word will need to render a formula to get it accepted as a formula by the reader.
Can you give ma an example (if anavoidabel as an imagew of a view on “living Word”).

Sorry. I defintely decided to not use “services” of that kind.
Yes. I know that this can be criticized, and that it means forgoing knowledge of possibly relevant facts.

Hi @Lupp .
I think this youtube tutorial shows better than if I make my own screen recording.

Sorry. I don’t watch clips of the kind. More than one reason.

And I didn’t want to learn anything about the current formula means of Word, but to learn what you meant by

And

was meant to accept a hardcopy of the situation where “return text instead of an image” gets understandable. It was not about another “screen recording” which I much dislike.

In general, I agree with all of your idea.
How do we proceed with “solid rigorous specification”?
The discussion is getting longer.
Is there any example?

I would like to try my best to help,
It is not about competing with other processor.

LO is good, I imagine if LO is a football team (soccer in US),
then MATH is the veteran, almost retired goalkeeper.
it’s good. But should be upgraded.

WYSIWYG is still easier for everyone, in general.
LO should be “all around” open-source software.
that in terms of text+math, everyone should be able to write that easily (easy to use) and get a good quality, without the need of learning to use macro+another programming language or installing extension, at least for ‘basic’ stuff that we discussed here.

One important reason that we may have yet mentioned:
I’m grateful for these missing/incomplete features that provided by Macro/extension/workaround, but it prohibits collaborative work.
It is ok for documents that only you and yourself edit it.
When you write an article, there will be many co-authors working on the same document.
It is not fun to say to them, please use this … install that…
I tried, it didn’t work.
Not even for the simplest thing like please install the missing font.
But this is the reason there’s an embed font option, isn’t it?
once i used the latex extension. the other person use lo-math.
its a mess. not to mentioned the other collaborator uses word.

I didn’t get this answer yet. Therefore I assume I actually don’t understand much of what’s posted in this thread. Consequently I will stop to make it grow even longer.