Open blefloch opened 3 years ago
A similar comment holds in xunicode-addon.sty
, which if I understand correctly is also supported by this organization on Github. Let me know if I should open a separate issue.
Indeedly, cctab
is more elegant. I used it in https://github.com/CTeX-org/ctex-kit/commit/bd9cc7ddd1c2baac288e7763976b11bec113a079 last year. But I found that cctab
is not fully compatible with the current LaTeX package loading mechanism (see #544 ). So I reverted to the traditional method in https://github.com/CTeX-org/ctex-kit/commit/182cb98e3df373d3e7035aadf4a365d4c39b8bf7.
\l__kernel_expl_bool
is used in \@pushfilename
and \@popfilename
to track the status of code syntax. When \ExplSyntaxOn
is used in the input file which is wrapped by cctab
, \ExplSyntaxOff
should be manually placed at the end of that file. Otherwise it will cause confusion (see #544).
Currently,
\ctex_push_file:
and\ctex_pop_file:
(used before/after loading a file) check the LaTeX3 internal boolean\l__kernel_expl_bool
to determine whether to issue\ExplSyntaxOn
or\ExplSyntaxOff
after loading the file. I think that the definitions could be replaced by the following code, but I am not totally sure.