expl3 を利用して あ
(U+3042) が \x{3042}
にマッチするか確かめる関数を upLaTeX で処理するとエラーになります。(LuaLaTeX や XeLaTeX ではエラー無く処理される)
upLaTeX でもこれがエラー無く処理できる方法はあるでしょうか。
バージョン
e-upTeX 3.141592653-p4.1.1-u1.30-230214-2.6 (utf8.uptex) (TeX Live 2024)
kpathsea version 6.4.0
ptexenc version 1.4.6
Copyright 2024 D.E. Knuth.
There is NO warranty. Redistribution of this software is
covered by the terms of both the e-upTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the e-upTeX source.
Primary author of e-upTeX: Japanese TeX Development Community.
再現
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{expl3}
\begin{document}
\ExplSyntaxOn
\regex_match:nnTF
{ \x{3042} }
{ あ }
{ True }
{ False }
\ExplSyntaxOff
\end{document}
該当するエラーメッセージ
Use of \??? doesn't match its definition.
<argument> \???
! LaTeX Error: Character code ##1 too large in \x{##2} regex.
l.9 { あ }
TeX ファイルと upLaTeX で実行した際のログファイルを添付します。
一方で、\x{0042}
等に変更するとエラー無くうまくいきます。
このことを踏まえて少し確かめてみると、\x{hh}
形式が使えないと言うよりは upLaTeX で \x{hh}
は \x{00FF}
までしか使えないような雰囲気でした。