Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Better support for Arabic math#633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
khaledhosny wants to merge3 commits intolatex3:master
base:master
Choose a base branch
Loading
fromkhaledhosny:arabic-math

Conversation

khaledhosny
Copy link
Contributor

@khaledhosnykhaledhosny commentedMar 31, 2024
edited
Loading

Status

UNDER DEVELOPMENT

Description

Improve handling of Arabic math symbols.

  1. Allow Arabic math alphabets to be used whenunicode-math is loaded, previously they would always be using CMMI fonts.
  2. Fix spacing of Arabic comma by making sure it gets punctuation math class.

Todo

  • Tests added to cover new/fixed functionality
  • Documentation added if necessary
  • Code follows expl3 style guidelines

Minimal example demonstrating the new/fixed functionality

\documentclass{article}\usepackage{unicode-math}\setmathfont{XITSMath-Regular.otf}\usepackage{ifluatex}\begin{document}\ifluatex\mathdir TRT\fi\[\mAlef +\mBeh =\minitialJeem\]\end{document}

Without this, even using Unicode literals does not work as it stilltries to use cmmi for them and we get the missing character warnings:Missing character: There is no 𞸃 (U+1EE03) in font cmmi10!
Without this it does not seem to get \mathpunct class and has the wrongspacing.
@khaledhosny
Copy link
ContributorAuthor

khaledhosny commentedMar 31, 2024
edited
Loading

I want to also implement math mapping for Arabic, so using regular Arabic letters in math mode would map to math alphanumerics like with Latin and Greek. I looked intoum-code-mathmap.dtx andum-code-alphabets.dtx but I’m still not sure how this works.

I’d need newinitial,tailed,looped, andextended math styles, as well as adding Arabic mapping tobb style.

I’m not sure what style to use for the first Arabic math alphabet; it is functionally equivalent to math italics, but it is not italic (there is not italic style in Arabic, but it it is not even slanted), soup would be a better fit, but what about the regular Arabic letters? (they are sometimes used in math, e.g. mathdal is used for variables while regulardal is used for function, similarf()), so may be useit for the math alphabet andup for the regular one.

\mathnormal would map to regular Arabic letters,up if we go with the scheme above, toit except forheh (it has noit form) andjeem (initial form is used).

I appreciate any guidance on how to achieve this.

@khaledhosny
Copy link
ContributorAuthor

khaledhosny commentedMar 31, 2024
edited
Loading

The last commit is my attempt to do the above (mostly copy/paste), but it does not seem to do any thing. I don’t actually think any of the code I added is being used.

@davidcarlisle
Copy link
Member

@khaledhosny thanks for this, Possibly can't review this weekend, but will look later, also if there are any updates needed in TR25 that may also be possible.

@khaledhosny
Copy link
ContributorAuthor

@khaledhosny thanks for this, Possibly can't review this weekend,

Thanks.

also if there are any updates needed in TR25 that may also be possible.

I think MathClass-15.txt is missing an entry for 060C giving it a P class (as well as my comment in#619 (comment)).

@wspr
Copy link
Collaborator

wspr commentedApr 1, 2024

Thanks@khaledhosny — and please don't hesitate to keep this on my radar if I seem to disappear for a while, it's a bit of a crazy year.

I would if we should we have this set up by default with all fonts, or is there more that needs to be done via OpenType features etc such that it would make sense to require an explicit option (which could use a heuristic to activate automatically) ?

@khaledhosny
Copy link
ContributorAuthor

Thanks@khaledhosny — and please don't hesitate to keep this on my radar if I seem to disappear for a while, it's a bit of a crazy year.

Thanks, no pressure.

I would if we should we have this set up by default with all fonts, or is there more that needs to be done via OpenType features etc such that it would make sense to require an explicit option (which could use a heuristic to activate automatically) ?

Typesetting Arabic math requires also right-to-left support in math mode, which is currently available in LuaTeX only and requires fiddling with low-level primitive. The changes here are prerequisite for further improvement in this area, as without this you can’t use Arabic math alphabets at all.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@khaledhosny@davidcarlisle@wspr

[8]ページ先頭

©2009-2025 Movatter.jp