Discussion:
[XeTeX] Allowing Ucharcat to produce active characters
Bruno Le Floch
2018-04-18 15:08:33 UTC
Permalink
Hello,

I suggest allowing \Ucharcat to produce active characters. See
three-line patch attached. This would allow to produce active
characters expandably in all engines (pdfTeX, luaTeX, XeTeX, pTeX,
upTeX). My code makes

\Ucharcat `~ 13
\expandafter\show\Ucharcat `~ 13
\edef\foo{\expandafter\noexpand\Ucharcat `~ 13 }

run the code of the active ~ as if it had been typed directly, then show
its meaning, then do the equivalent of \def\foo{~}.

Bruno
Joseph Wright
2018-04-18 16:52:17 UTC
Permalink
Post by Bruno Le Floch
Hello,
I suggest allowing \Ucharcat to produce active characters. See
three-line patch attached. This would allow to produce active
characters expandably in all engines (pdfTeX, luaTeX, XeTeX, pTeX,
upTeX). My code makes
\Ucharcat `~ 13
\expandafter\show\Ucharcat `~ 13
\edef\foo{\expandafter\noexpand\Ucharcat `~ 13 }
run the code of the active ~ as if it had been typed directly, then show
its meaning, then do the equivalent of \def\foo{~}.
Bruno
In case anyone wonders: only XeTeX has \Ucharcat. In LuaTeX we can make
char tokens from the 'Lua side', so are unrestricted in terms of
catcode. In pdfTeX and (u)pTeX, assuming we are only dealing with the
8-bit range (upTeX) it's feasible to pre-generate all combinations and
use expandable macros to output the tokens.

Joseph



--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex

Loading...