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

xfrac reverses numerator and denominator in align environment with babel #5

Open
ShaiAvr opened this issue Dec 28, 2024 · 0 comments
Open

Comments

@ShaiAvr
Copy link

ShaiAvr commented Dec 28, 2024

There seems to be a bug with xfrac when using it in an align environment while using babel and an RTL language. The numerator and denominator are reversed in this case. I write my homework in Hebrew and this simple snippet shows the bug:

\documentclass{article}

\usepackage[amsthm, libertine, varbb]{newtxmath}

\PassOptionsToPackage{no-math}{fontspec}
\usepackage[bidi=basic, layout=tabular, headfoot=hebrew]{babel}

\babelprovide[main, import, alph=letters, Alph=letters]{hebrew}
\babelprovide[import]{english}

\usepackage{amsmath}
\usepackage{xfrac}

\begin{document}
\begin{align*}
\sfrac{x}{y}
\end{align*}
\[ \sfrac{x}{y} \]
\end{document}

Here's the result (Using LuaLatex):

Screenshot 2024-12-28 191541

Commenting out the babel setup gives the desired result. I tried to ask this on tex.stackexchange.com and it seems this issue is something that needs to be fixed with the xfrac package.

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

1 participant