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

MWE: framebox and RTL issue #10

Open
mahmadzaid opened this issue May 5, 2023 · 5 comments
Open

MWE: framebox and RTL issue #10

mahmadzaid opened this issue May 5, 2023 · 5 comments
Labels
bug Something isn't working report to SILE Issue should be generalized and reported to SILE

Comments

@mahmadzaid
Copy link

\begin[papersize=b6,class=plain]{document}
\use[module=packages.frametricks]
\use[module=packages.framebox]
\use[module=packages.rules]
\use[module=packages.color]
\nofolios
\neverindent
\define[command=sbox]{\framebox[bordercolor=#008000]{\color[color=#8b0000]{\process}}}
\define[command=hlght]{\color[color=#8b0000]{\process}}
\define[command=cmnt]{\breakframevertical\font[size=0.8em]{\color[color=#666666]{\process}}\smallskip}
\define[command=rtlframe]{\breakframevertical\thisframedirection[direction=RTL]}
\define[command=ltrframe]{\breakframevertical}
\font[family="Amiri",size=12pt]


\cmnt{LTR language:}

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\bigskip

\cmnt{LTR}
\ltrframe
Lorem ipsum dolor sit amet, \sbox{consectetur adipiscing} elit, sed do eiusmod tempor \sbox{incididunt} ut labore et dolore magna aliqua.

\bigskip

\cmnt{RTL}
\rtlframe
Lorem ipsum dolor sit amet, \sbox{consectetur adipiscing} elit, sed do eiusmod tempor \sbox{incididunt} ut labore et dolore magna aliqua.

\medskip\fullrule\medskip

\cmnt{RTL language:}
\rtlframe
عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \hlght{يونيكود}.

عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \hlght{unicode}.

\bigskip

\cmnt{LTR}
\ltrframe
عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \hlght{unicode}.

عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \sbox{unicode}.

عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \sbox{يونيكود}.

\bigskip

\cmnt{RTL}
\rtlframe
عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \hlght{unicode}.

عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \sbox{unicode}.

عندما يريد العالم أن يتكلّم، فهو يتحدّث بلغة \sbox{يونيكود}.

\end{document}

image

Notice how the highlighted arabic word is rendered with the letters in reverse order.

@Omikhleia
Copy link
Owner

Doesn't the same issue occur with a mere \hbox or a (from the rules package, deprecated but still there) \boxaround ?

@Omikhleia Omikhleia added the bug Something isn't working label May 5, 2023
@Omikhleia
Copy link
Owner

As far as I can tell, it does occur with a mere hbox and stock SILE 0.14.9

image

I am interested in a double-check (I can't read arabic, so I may miss some point), but I'm afraid it's a bug with SILE then. (And whenever fixed, we might have to check this package again, it has some "compatibility shim" still in place for earlier versions of SILE that might need to be revisited too).

But for the time being, it seems to me it's a SILE bug, that should be reported there.

@Omikhleia Omikhleia added the report to SILE Issue should be generalized and reported to SILE label May 5, 2023
@mahmadzaid
Copy link
Author

I'm getting the same results with \hbox, so you're right, it's a SILE bug.

@Omikhleia
Copy link
Owner

Omikhleia commented May 5, 2023

Couldn't find an existing SILE issue that would correspond perfectly, so perhaps can your report it there? You'd be better at simplifying a MWE than I ^^
Note: I'd suggest removing the colors, as there are some issues with them in bidi mode, it seems.

@mahmadzaid
Copy link
Author

reported to SILE here sile-typesetter/sile#1796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working report to SILE Issue should be generalized and reported to SILE
Projects
None yet
Development

No branches or pull requests

2 participants