Support bmod and pmod

This commit is contained in:
gloamxun committed 2026-10-20 19:13:53 +08:00
1 parent 7376acffb2
commit df511602cf
1 file changed
+11
+11
View File
@@ -1277,6 +1277,17 @@ mod tests {
assert_eq!(plain.width, numbered.width);
assert_eq!(plain.height, numbered.height);
}
#[test]
fn pmod_wraps_the_argument_and_bmod_stays_inline() {
let font = Cmr10Metrics::default();
let pmod = layout_math(&parse_math(r"a\pmod{m}"), &font);
assert!(pmod.width > layout_math(&parse_math(r"a"), &font).width);
assert!(matches!(
&parse_math(r"\bmod"),
MathAtom::Row(atoms) if matches!(&atoms[0], MathAtom::Text(text) if text == "mod")
));
}
#[test]
fn operatorname_star_does_not_emit_a_symbol() {
let font = Cmr10Metrics::default();