Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unusable in Arabic documents #6

Closed
amarakon opened this issue Mar 6, 2023 · 9 comments
Closed

[Bug] Unusable in Arabic documents #6

amarakon opened this issue Mar 6, 2023 · 9 comments

Comments

@amarakon
Copy link

amarakon commented Mar 6, 2023

First, thanks for such a useful LaTeX package. But unfortunately, I cannot use it on my Arabic documents because it causes two problems:

  1. Paragraphs are typeset from left to right, instead of from right to left.
  2. The Arabic letters look detached and glitchy.

Here is a minimum working example you can use to test it:

\documentclass{article}

\usepackage{linebreaker}
\usepackage[bidi = basic]{babel}
\babelprovide[main]{arabic}
\babelfont{rm}{Scheherazade New}

\begin{document}
لكن لا بد أن أوضح لك أن كل هذه الأفكار المغلوطة حول استنكار  النشوة وتمجيد الألم
نشأت بالفعل، وسأعرض لك التفاصيل لتكتشف حقيقة وأساس تلك السعادة البشرية، فلا أحد
يرفض أو يكره أو يتجنب الشعور بالسعادة، ولكن بفضل هؤلاء الأشخاص الذين لا يدركون بأن
السعادة لا بد أن نستشعرها بصورة أكثر عقلانية ومنطقية فيعرضهم هذا لمواجهة الظروف
الأليمة، وأكرر بأنه لا يوجد من يرغب في الحب ونيل المنال ويتلذذ بالآلام، الألم هو الألم
ولكن نتيجة لظروف ما قد تكمن السعاده فيما نتحمله من كد وأسي.
\end{document}

@hpvd
Copy link

hpvd commented Mar 6, 2023

just an addition for when trying to reproduce:
Scheherazade New is available at:
https://software.sil.org/scheherazade/

@hpvd
Copy link

hpvd commented Mar 6, 2023

comparison (latest Miktex, Windows, font installed as ttf)
2023-03-06_12h02_43

@amarakon is this screenshot of "without the package" looking the way you would rate it as good? (sorry, I have no experience how arabic should look like)

@michal-h21
Copy link
Owner

Thanks for the report. The paragraph direction is lost, which causes both issues. Hopefully, the last commit should fix this issue.

@hpvd
Copy link

hpvd commented Mar 6, 2023

wow, fast as always.
If @amarakon confirms everything looking fine now,
-> maybe it's a good reason for a new release to ctan?
The last one was one year ago...
https://ctan.org/pkg/linebreaker

@michal-h21
Copy link
Owner

Yes, I should make an update if everything works. This is a serious issue.

@hpvd
Copy link

hpvd commented Mar 6, 2023

btw @amarako
having you in this discussion is a rare chance.

-> Would you mind giving the combination of

  • this linebreaker package
  • with the lua-widow-control package

a try for an Arabic document?

And report if everything looks fine to you?
Would be awesome!

Background: since both packages are complementing each other in a perfect way, they are often used together

see https://github.com/gucci-on-fleek/lua-widow-control

@amarakon
Copy link
Author

amarakon commented Mar 6, 2023

@amarakon is this screenshot of "without the package" looking the way you would rate it as good? (sorry, I have no experience how arabic should look like)

Yes, that looks perfect. Thanks for such a quick fix!

wow, fast as always.
If @amarakon confirms everything looking fine now,
-> maybe it's a good reason for a new release to ctan?
The last one was one year ago...
https://ctan.org/pkg/linebreaker

I agree, I think this is a good idea.

-> Would you mind giving the combination of

  • this linebreaker package
  • with the lua-widow-control package

a try for an Arabic document?

I tried both of them together, and they both work as expected. linebreaker prevents overfull lines, and lua-widow-control prevents widows and orphans.

@amarakon amarakon closed this as completed Mar 6, 2023
@hpvd
Copy link

hpvd commented Mar 6, 2023

many thanks!

@hpvd
Copy link

hpvd commented Mar 9, 2023

@michal-h21 thanks for new release on ctan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants