Skip to content

Commit

Permalink
make \RequireBidi no-op after one use (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
Udi-Fogiel committed Jun 4, 2024
1 parent 9a5f4f2 commit 702eb27
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tex/polyglossia.sty
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,16 @@
}

%% Used by the language definitions files for right-to-left languages
\cs_new_nopar:Npn \RequireBidi
{
\xpg_if_in_preamble:T
\DeclareDocumentCommand \RequireBidi {}
{
\sys_if_engine_luatex:TF
{ \RequirePackage{luabidi} }
{ \RequirePackage{bidi} }
\xpg_if_in_preamble:T
{
\sys_if_engine_luatex:TF
{ \RequirePackage{luabidi} }
{ \RequirePackage{bidi} }
}
\DeclareDocumentCommand \RequireBidi {} {}
}
}

% if #1 is LR run T else F
\prg_set_conditional:Nnn \__xpg_if_LR_str:n {p, T, F, TF}
Expand Down

0 comments on commit 702eb27

Please sign in to comment.