LO Writer and Math: How to Insert Formula in Right to Left Direction?

Further to @keme1 comment, as a workaround, you might try exporting the document (with Latin equations) to LaTex and then opening the file in in a LaTex editor that supports Arabic RTL equations and editing just the equations. A cursory search suggests XeLaTeX (XeTeX engine) or LuaLaTeX (LuaHBTeX engine) might be suitable.

The extension for export to Latex would be Writer2LaTex, Writer2LaTeX » Extensions

As a teacher of math and physics in Germany, I stressed, of course, that there were important contributions to math, astronomy, and any science by people from Arabic culture over centuries. Even the mathematical “books” from ancient Greece first came to us by Arab mediation (if they were saved at all) via the Iberian PI. (There also may have been some less welcome things coming that way.) We also teach that the term “Algebra” is derived from an Arab expression. Is that right?
I can’t see, however, in what way the respect for different cultures should require to support stubborn specifics endangering the basis for global cooperation. That teachers in countries using one or another variant of Arabic will teach their pupils in that language should be expected anyway, independent of whether that language is “wonderful” or not.

I completely disagree, but if anything I wrote was looking like “hate speech” to anybody, I strongly regret the effect even if being contrary to my intentions.
I don’t hate anything but nationalisms - using the term in the more generalizing way George Orwell introduced with his “Notes on Nationalism”. Only recently I started to reconsider if this can (must?) rightfully include to “hate” the criminal and despotic gamblers basing their power on any kind of nationalism. You can easily get a list of hundreds of them without excluding any “culture” that exists or existed in the world.

Agree.

Please also consider my opinion, that nobody can rightfully demand to get exactly what he (f/m) wanted and nothing else. After all there is context everywhere, and we need to also respect different weightings by different people insofar. The current state of the world isn’t as it should be, and every field of human activities should contribute to improvements.

Unfortunately you didn’t provide the Math formulas from your image containing Arabic script in a LibreOffice file. Therefore I couldn’t experiment with the elements. In very rare cases, and wasting a lot of time it might be a way, to create a kind of frame consisting of mathematical symbols (opertators, placements, …) as an OLE object (Math), to use Draw to convert it to (e.g.) a “Metafile”, to flip the graphic horizontally, and then to combine it with graphical elements (textbox or other) introducing the script.

Much better concerning everything to be communicated as “clear information” would be to use globally harmonized standards. This will require to abolish some local/regional well-loved peculiarities, among them …
I personally am ready to change my writing direction to RTL if this is necessary to prepare for a better future.
Nothing is too ugly to exclude it if it can help to make peace. Nothing is wonderful enouigh to justify insisting on it if it is incompatible with dire necessity.

1 Like

FWIW, your comments came out very patronizing and borderline insulting. Someone is asking how to do X in LibreOffice, you don’t answer by why do you want to do X then go on and question their entire culture.

The OP didn’t demand anything, you are the one belittling and lecturing them about their own needs.

Some countries teach math in Arabic, set from right to left, and this is a fact. People need to do that in LibreOffice, that is another fact. No amount of patronizing comments and talk about cultural superiority and international cooperation is going to change that.

This doesn’t look like you actually read my comments unbiasedly.
Could it be that you are entrapped in some dangerous prejudices?
… …
Thanks anyway for contributing to the development of LibreOffice. I’m not capable of joining you insofar, and I’m too old to catch up.

1 Like

I guess lecturing someone about what they should and should not do and accusing them for being nationalist for simply wanting to typeset some math using local conventions is just a neutral, unbiased, non-patronizing, non-insulting attitude.

I didn’t knowingly accuse anybody of anything, but posted some views on aspects in a lose relation. I already admitted that they were actually off-topic. Sorry.
… …
I didn’t accuse anybody of “being a nationalist”.
… …
I was accused plentifully and explicitly based on misunderstandings and tried to defend. No way. Let’s close this dispute. We obviously cannot find a language both sides can use trusting in an appropriate understanding on the other side.

@khaledhosny2: Quit the hate mongering and playing the victim. You should know better. Several valuable contributors have left this place on completely unfounded accusations of patronizing. You want more people to leave? Go right ahead.

If somebody has a crazy idea and wants to implement that, it’s not patronizing to advise them to rethink their plans, it’s being helpful.

Unless some rich people in the Arabian world are willing to pay for the translation of every book on science into Arabic, people will have to read books on science in a foreign language, most likely English, with mathematical formulas LTR. I am Dutch, and I had to read lots of English. It’s a matter of common sense to learn to read formulas in the style most widely used in the world, for sooner or later you will be exposed to them, anyway. So, you might as well start learning to read that style of formulas sooner.

All astronomers in the entire world use the names Algol, Betelgeuse, Deneb, etc. for individual stars, because Arabic astronomers were the first to give names to individual stars. It’s not superiority but priority that matters, and of course prevalence. If you want to make a difference in the world of science, publish in English. Not because that is a superior language, but because you will then be most widely read.

@anon87010807 I’m not playing victim, and you are a racist and you know it. Cut the bullshit already.

@khaledhosny2: Get lost. You should get banned for this nonsense.

@anon87010807
This is a different and -up to now rare- case where a contributor playing the “you accused me/us”-card actually contributed supposedly valuable code. He clearly is superior to me - at least insofar.
He created the solution for tdf#111705 after all.

I tip my hat!
He may decide himself concerning what topics he wants to contribute to development.

Of course there are lots of reservations, but: We should stop this quarrel.

The next version of LibreOffice (24.2) will have support for setting Math direction to right-to-left and using Arabic math symbols:

math-arabic-1.odf (7.1 KB)

tdf#134193, tdf#111705

3 Likes

السلام عليكم أخ خالد …

شكراً على الرد على سؤالي …

أنت قلت أن الإضافة سوف تكون في الإصدار 24.2 ، لكن آخر إصدار 7.6.1.2، هل هناك ترقيم آخر لإصدارات LibreOffice؟

وهل خطوط الرياضيات المميزة مضمنة فيه؟

لو تعطنا تفاصيل ومميزات!

About new numbers in LibreOffice version:

And you can download if from Daily builds

1 Like

نعم، نظام ترقيم الإصدارات تغير بدء من الإصدارة القادمة، وأصبح سنة.شهر
الخط غير مضمن حاليا، لكن يمكنك استخدام خطي XITS Math وأميري فهما المستخدمان في الصورة أعلاه.

1 Like

I tried it but unfortunately it seems there isn’t an entire RTL support in Math Formulas :-(.
I made little macro to change the Latin numbers to the Arabic ones in selected Math Formula, maybe it will help you, but of course - the problem could be with the Arabic font, so you can change the constant cFont in the macro Main to the Arabic font you use. There is Scheherazade in the macro as default
example-Ar-numbers-in-Math-formula.odt (21.6 kB)

I think a little bit easier than Group Text boxes is Copy&Paste Math Formula to Draw and Convert it to Curve, Ungroup and do operations like Shape/Flip for SQRT sign etc. but the disadvantage is, it will be only a graphic shapes and no a formula.

@KamilLanda

Thank you, I will download and see the file you attached.

In fact using Insert Formula will be more easier than text boxes or LO Draw.

I found something on Github! but I am not a programmer, I do not know how to use it, or if it is useful!!!

If you have a time, please have a look:

thank you.

From a superficial examination, this has nothing to do with the formula editor Math. It is one of the library components to convert between string and floating representation.
It will not help your present problem.

Thank you @ajlittoz :slightly_smiling_face:

Do you have any Idea or something can Help?

Thank you: :slightly_smiling_face:

Using Arabic letters is not problem with me, and using Draw to create equations is the same as text boxes in Writer!

Using Writer (insert Formula) or LO Math to edit equation is very easy, it gave the ability to use fields to put symbols , Fractions, Automatic Root top line and others.

The direction (RTL) is the main problem to me!

Unfortunately I don’t see the chance how to do it simply in LibreOffice in this time :-(. Complete RTL support isn’t implemented and I didn’t discover any twist how to make it.

1 Like