michal-h21 / linebreaker

Some excersises with luatex's line breaking callback
15 stars 1 forks source link

linebreaker seems to break a english and arabic multicol document #9

Closed hpvd closed 1 year ago

hpvd commented 1 year ago

follow up to https://github.com/michal-h21/linebreaker/issues/6 https://github.com/michal-h21/linebreaker/issues/7

this looks like a new edge case where linebreaker (in combination with latest babel 2023/03/28 3.87) seems to break the output of an english/arabic document

main difference to issues mentioned above (from my pov)

\listfiles
\documentclass[A4]{book}

\usepackage{multicol}
\usepackage{lipsum}
\usepackage{linebreaker}
\usepackage[bidi = basic]{babel}

\babelprovide[main, import]{english}
\babelprovide[import]{arabic}

\babelfont[english]{rm}{times}
\babelfont[arabic]{rm}{Amiri}

\begin{document}

\begin{multicols}{3}
    \lipsum[1-6]

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

\end{document}

enabling linebreaker leads to:

2023-04-08_14h06_02

hpvd commented 1 year ago

strange.. seems not only depending on linebreaker.. maybe linebreaker activate the usage of some font feature not available in Amiri ? Or linebreaker plus babel plus Amiri..

hpvd commented 1 year ago

hmmm seems to work with latest texlive see https://github.com/latex3/babel/issues/233

hpvd commented 1 year ago

Updating Amiri to latest release (1.0.0) directly from https://github.com/aliftype/amiri/releases instead of downloaded from https://fonts.google.com/specimen/Amiri doesn't help on my site

hpvd commented 1 year ago

@amarakon would you mind looking if this is working for you and post a screenshot? Would be great! (miktex and texlive now include/provide all updated packages (babel and linebreaker))

michal-h21 commented 1 year ago

The provided MWE seems to render correctly for me with TeX Live 2023 updated today.

hpvd commented 1 year ago

Thanks for testing. The problem seems to be somewhere on my site :-( Had also a discussion on it in babel and miktex repository. https://github.com/latex3/babel/issues/233 https://github.com/MiKTeX/miktex/issues/1315

amarakon commented 1 year ago

@amarakon would you mind looking if this is working for you and post a screenshot? Would be great!

I don’t have the times font installed on my system, so I tested with EB Garamond instead. It works fine for me.

import-2023-04-11_21:13:47