Skip to content

Commit

Permalink
Resolve catcode regime conflict
Browse files Browse the repository at this point in the history
revealed in LyX testing
  • Loading branch information
jspitz committed Sep 12, 2024
1 parent 950b365 commit 3d36fb1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tex/polyglossia.sty
Original file line number Diff line number Diff line change
Expand Up @@ -2021,10 +2021,13 @@
% Since captions might float to other language regions,
% we need to specify the language here (#542)
\cs_set_eq:cc { __xpg_save_caption:n } { @caption }
\cs_new:Npn \xpg@current@opts {}
\cs_set:Npn \@caption #1 [#2] #3
{
\__xpg_save_caption:n { #1 } [ { \selectlanguage*[\xpg__current_options_tl]{\languagename}#2} ] { #3 }
% we might be outside of l3 catcode regime
\tl_set_eq:NN \xpg@current@opts \xpg__current_options_tl
\__xpg_save_caption:n { #1 } [ { \selectlanguage*[\xpg@current@opts]{\languagename}#2 } ] { #3 }
}
}
Expand Down

0 comments on commit 3d36fb1

Please sign in to comment.