-
Notifications
You must be signed in to change notification settings - Fork 35
hbox inside equation is problematic #285
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
Comments
If
|
@Udi-Fogiel @seloumi Thanks. I usually take a short break when TeXLive is about to be published (I don't like to make any last minute changes, unless it's a severe bug). When it's frozen, I'll start investigating. |
The title summarizes very well the whole point here:
|
I think it would be much easier to solve it upstream (at least in the case of big packages such as tikz). |
Indeed, in an ideal world— 🙂. But even
|
@jbezos I worked on a port of ConTeXt's code to OpTeX, and it also works with LaTeX and Plain (the requirement is a subset of |
@Udi-Fogiel 👍 Great! One of the reasons for requiring the |
@Udi-Fogiel A question. How fast is it? At first glance, it seems it translates more or less directly the Unicode implementation of the algorithm, with lots of loops, something I avoided for efficiency reasons. |
@jbezos I did not test it with long documents yet, but I think it is slower than your code. In ConTeXt itself it is probably even slower as the data file is huge. The code originates from a port of minibidi.c from Arabeyes to Lua made by Khaled Hosny: Even after making the original code running, it had many problems so I eventually decided to use the more up to date code from ConTeXt. I also tried to port your code to OpTeX, and it almost worked smoothly, I don't remember exactly what broke but I think it was related to code written outside the Lua module in TeX, so it got a bit convoluted... |
BTW, any suggestions for a package name? CTAN does not like uax9, and bidi, unicode-bidi and luabidi are taken. |
Naming things is always a headache for me! 🙂 |
@Udi-Fogiel It passed my tests with RTL as the main text and LTR as secondary one. On the other hand, embedded Arabic in LTR text is not correctly rendered (without markup). The reason is the directionality of characters is not enough and the font with the proper language system is also required. This is something |
@jbezos Can you give an example with the expected output? |
If you have one with Hebrew it will be better, but Arabic is fine as well. |
And if this will be the case, maybe the other way around will be easier, i.e. adding an option in unibidi-lua to address this. I'll just need to understand what this is about... |
\documentclass{article}
\usepackage[bidi=basic]{babel}
\babelfont{rm}{FreeSerif}
\babelprovide[ fonts]{arabic}
\begin{document}
بى 19 az 29 تى 19 29 39 ثى 49-59 سى 69/79 شى 19.29 صى 39,49
\end{document} However, the following: \documentclass{article}
\usepackage{unibidi-lua}
\usepackage{babel}
\babelfont{rm}{FreeSerif}
\babelprovide[ fonts]{arabic}
\begin{document}
بى 19 az 29 تى 19 29 39 ثى 49-59 سى 69/79 شى 19.29 صى 39,49
\end{document} I’d like to note that, as there is already a (mostly) working bidi mechanism in |
Thank you for the example. Since you seem to know what the problem is, when you will have time, can you describe what needs to be done, or even just points me where in the code babel address it? I opened a ticket if you prefer to describe it there, but here is fine as well.
I mainly ported the code to be used with OpTeX, so I don't have a strong opinion on whether it should be integrated with babel, this is really up to you. But I would like to fix the bug you found... any help is welcome. |
Uh oh!
There was an error while loading. Please reload this page.
see https://tex.stackexchange.com/questions/709365/inline-equation-breaks-when-adding-hebrew-text-with-the-witharrows-package for an example. Here are more minimal example
The text was updated successfully, but these errors were encountered: