Skip to content

Commit

Permalink
\Ucharcat is available in recent (u)pTeX
Browse files Browse the repository at this point in the history
It can only cover the 8-bit range, but that's OK
as there is a check before we ever try to call it.
  • Loading branch information
josephwright committed Feb 9, 2023
1 parent 6c7519e commit e802884
Show file tree
Hide file tree
Showing 3 changed files with 1,084 additions and 9 deletions.
15 changes: 6 additions & 9 deletions l3kernel/l3token.dtx
Expand Up @@ -1557,12 +1557,11 @@
}
\tl_new:N \l_@@_tmp_tl
% \end{macrocode}
% Engine-dependent definitions are now needed for the implementation. For
% \LuaTeX{} and \XeTeX{} there is engine-level support.
% They can do cases that macro emulation can't. All of those are filtered
% out here using a primitive-based boolean expression to avoid fixing
% the category code of the null character used in the false branch
% (for 8-bit engines).
% Engine-dependent definitions are now needed for the implementation. Recent
% (u)p\TeX{} and the Unicode engines \LuaTeX{} and \XeTeX{} have engine-level
% support for expandable character creation. \pdfTeX{} and older (u)p\TeX{}
% releases do not. The branching here if low-level to avoid fixing
% the category code of the null character used in the false branch.
% The final level is the basic definition at the engine level: the arguments
% here are integers so there is no need to worry about them too much.
% Older versions of \XeTeX{} cannot generate active characters so we filter
Expand All @@ -1573,9 +1572,7 @@
\group_begin:
\char_set_catcode_active:N \^^L
\cs_set:Npn ^^L { }
\if_int_odd:w 0
\sys_if_engine_luatex:T { 1 }
\sys_if_engine_xetex:T { 1 } \exp_stop_f:
\if_cs_exist:N \tex_Ucharcat:D
\cs_new:Npn \@@_generate_aux:nnw #1#2#3 \exp_end:
{
#3
Expand Down

0 comments on commit e802884

Please sign in to comment.