reutenauer / polyglossia

An alternative to Babel for XeLaTeX and LuaLaTeX
http://www.ctan.org/pkg/polyglossia
MIT License
185 stars 52 forks source link

Error when loading RTL languages after LaTeX update #647

Open Udi-Fogiel opened 1 month ago

Udi-Fogiel commented 1 month ago
\documentclass{article}
\usepackage{polyglossia}
\setotherlanguage{kurdish}

\stop

now fails on master, after https://github.com/latex3/latex2e/pull/1187/commits/0256b600aad0e10ae14d465a493f16eaf1398edf. This is related to the location we use \RequireBidi. It is used in the key direction in polyglossia setup, and in kurdish the different variants set the direction using \SetLanguageKeys, and so \RequireBidi is issued again. It happens inside \__xpg_register_language:nn in a group where the options are set again to retrieve the correct babel name etc.,

Note that in the branch I'm currently working on, this problem does not exist, as there I don't spam RequireBidi, but I also don't warn when an RTL language is used, but bidi was not loaded (I'm still figuring out what best method would be to do that).

In any case, I think for now the best thing to do is to make \RequireBidi a no-op after one use.

Udi-Fogiel commented 1 month ago

BTW, we should probably test ourselves if a gloss is being loaded in a group, just to be safe, but I'll leave that for after the release.