Bug 111705 - Allowing Arabic mathematical expressions
Summary: Allowing Arabic mathematical expressions
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: ⁨خالد حسني⁩
URL:
Whiteboard: target:24.2.0 inReleaseNotes:24.2
Keywords:
Depends on:
Blocks: Formula-Editor RTL-Arabic-and-Farsi
  Show dependency treegraph
 
Reported: 2017-08-11 19:55 UTC by Volga
Modified: 2024-01-26 08:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Arabic math document (8.67 KB, application/vnd.oasis.opendocument.formula)
2023-09-19 07:29 UTC, ⁨خالد حسني⁩
Details
PDF exported from the sample document (38.40 KB, application/pdf)
2023-09-19 07:37 UTC, ⁨خالد حسني⁩
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2017-08-11 19:55:06 UTC
Description:
LO Math can be improved to allowing Arabic mathematical expressions. To make them presented as expected, we can allowing 𞻰, 𞻱 placed as the middle line of a stacked fraction and being extended, also add an option to allow RTL direction.

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:
-


Reproducible: Always

User Profile Reset: No

Additional Info:
https://en.wikipedia.org/wiki/Modern_Arabic_mathematical_notation


User-Agent: Mozilla/5.0 (Android 4.3; Mobile; rv:55.0) Gecko/55.0 Firefox/55.0
Comment 1 Volga 2017-08-11 20:04:48 UTC
We can also allowing √ presented its mirror forms in RTL direction activated, otherwise (if a font does not support it) forced mirrored it on screen.
Comment 3 Volga 2017-09-10 15:58:13 UTC
(In reply to Regina Henschel from comment #2)
> Volga: Is that available in MathML 2.0? In ODF 1.2 it is specified, that
> this is used. See
> http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.
> html#__RefHeading__440362_826425813 and
> http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.
> html#__RefHeading__1416212_253892949
Sorry for late responce. W3C has a documentation for this.
https://www.w3.org/TR/arabic-math/
According to the date this is published in 3 years later after MathML 2.0 published, so I think this is available in MML 2.0 and we can try it.
Comment 4 Volga 2017-10-16 05:45:21 UTC
(In reply to Regina Henschel from comment #2)
> Volga: Is that available in MathML 2.0? In ODF 1.2 it is specified, that
> this is used. See
> http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.
> html#__RefHeading__440362_826425813 and
> http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.
> html#__RefHeading__1416212_253892949

Hi Regina, WDYT?
Comment 5 Volga 2018-05-16 06:06:46 UTC
I think this is unnecessary, since TexMaths extension added support for XeLaTeX, which is able to produce such formulas.
Comment 6 Xisco Faulí 2018-11-27 20:21:46 UTC
(In reply to Volga from comment #5)
> I think this is unnecessary, since TexMaths extension added support for
> XeLaTeX, which is able to produce such formulas.

Closing as RESOLVED WONTFIX
Comment 7 ⁨خالد حسني⁩ 2023-08-16 12:43:54 UTC
I’m working on this, if it requires updates to the ODF format, then we should do that as well.
Comment 8 Regina Henschel 2023-08-16 15:41:38 UTC
ODF allows all of MathML 2.0. For right-to-left that is in
https://www.w3.org/TR/MathML2/chapter3.html#presm.bidi
If you want RTL directionality of mathematics formulas you need MathML3.

In that case please write a request to office-comment@lists.oasis-open.org
https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=office. There is no change in the Relax schema needed, but only a change in the text.
https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1416212_253892949

Since ODF has no relationships to the content of the <math> element, I don't see a problem with moving from MathML 2.0 to MathML 3.0 from a standards perspective.
Comment 9 ⁨خالد حسني⁩ 2023-08-28 10:56:11 UTC Comment hidden (off-topic)
Comment 10 ⁨خالد حسني⁩ 2023-08-28 10:57:15 UTC Comment hidden (off-topic)
Comment 11 ⁨خالد حسني⁩ 2023-08-28 11:32:12 UTC
(In reply to Regina Henschel from comment #8)
> ODF allows all of MathML 2.0. For right-to-left that is in
> https://www.w3.org/TR/MathML2/chapter3.html#presm.bidi
> If you want RTL directionality of mathematics formulas you need MathML3.
> 
> In that case please write a request to office-comment@lists.oasis-open.org
> https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=office.
> There is no change in the Relax schema needed, but only a change in the text.
> https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part3-schema/
> OpenDocument-v1.3-os-part3-schema.html#__RefHeading__1416212_253892949
> 
> Since ODF has no relationships to the content of the <math> element, I don't
> see a problem with moving from MathML 2.0 to MathML 3.0 from a standards
> perspective.

Thanks, I sent an email to office-comment@lists.oasis-open.org
Comment 12 ⁨خالد حسني⁩ 2023-09-16 09:43:44 UTC
(In reply to Xisco Faulí from comment #6)
> (In reply to Volga from comment #5)
> > I think this is unnecessary, since TexMaths extension added support for
> > XeLaTeX, which is able to produce such formulas.
> 
> Closing as RESOLVED WONTFIX

FWIW, XeTeX does not support RTL math. We now have RTL math (Bug 134193), what remains is to support Arabic-specific big operators mentioned here.
Comment 13 Commit Notification 2023-09-18 00:33:01 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d4edecb26cc5a801815a612cdd27f3dc621d5038

tdf#111705: Add support of Arabic summation operator (U+1EEF0)

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2023-09-18 00:33:03 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9023cbc96c3538995f0ef9042aebcad14711cd60

tdf#111705: Add support of Persian limits operator (U+1EEF1)

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2023-09-18 06:09:33 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2cedcebc15f7199c8a3c16bb3f25c7a422770ecc

tdf#111705: Add the new maj and hadd operators to the elements panel

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2023-09-18 21:05:54 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5416c9183384d46f9eb347871541c6ee1e30c28b

tdf#111705: Add Arabic math symbols to the symbols catalogue

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Eyal Rozenberg 2023-09-19 06:16:42 UTC
Can someone post a document with some Arabic mathematical expressions, as an attachment?

Khaled: Thanks for another RTL win! :-)

Xisco: This shows us that we need to more carefully distinguish between WONTFIX and "extremely low priority"...
Comment 18 ⁨خالد حسني⁩ 2023-09-19 07:29:14 UTC
Created attachment 189693 [details]
Sample Arabic math document
Comment 19 ⁨خالد حسني⁩ 2023-09-19 07:37:27 UTC
Created attachment 189694 [details]
PDF exported from the sample document
Comment 20 BogdanB 2023-09-21 04:09:06 UTC
Verified. Like in the PDF from comment 19.
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a34dcd03254480927c403d904c0e754802d97b90
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded