Expand native Unicode character primitives and definitions

This commit is contained in:
gloamxun committed 2026-11-21 11:58:23 +08:00
1 parent d17680fcd8
commit 651fab42f1
7 files changed
+227 -31

No files matched your search

+10 -4
View File
@@ -359,6 +359,8 @@ pub enum Primitive {
Umathcharnum,
Umathchardef,
Umathcharnumdef,
Uchar,
Ucharcat,
}
impl Primitive {
@@ -394,6 +396,8 @@ impl Primitive {
| Noexpand
| Expandafter
| Number
| Uchar
| Ucharcat
| Romannumeral
| Fontname
| The
@@ -484,7 +488,7 @@ pub enum Meaning {
Count(u16),
Toks(u16),
TokenParameter(TokenParameter),
CharGiven(u8),
CharGiven(u32),
MathCharGiven(u16),
Register(Register),
Parameter(Parameter),
@@ -1132,7 +1136,7 @@ impl Default for State {
] {
state.parameters.insert(p, v);
}
state.install_unicode_math_commands();
state.install_unicode_commands();
state
}
}
@@ -1552,13 +1556,15 @@ impl State {
}
}
}
self.install_unicode_math_commands();
self.install_unicode_commands();
self
}
fn install_unicode_math_commands(&mut self) {
fn install_unicode_commands(&mut self) {
use Primitive::*;
for (name, primitive) in [
("Uchar", Uchar),
("Ucharcat", Ucharcat),
("Umathcode", Umathcode),
("XeTeXmathcode", Umathcode),
("Umathcodenum", Umathcodenum),