diff --git a/crates/texrra-tex-core/src/math.rs b/crates/texrra-tex-core/src/math.rs index dabdf76..f67a016 100755 --- a/crates/texrra-tex-core/src/math.rs +++ b/crates/texrra-tex-core/src/math.rs @@ -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();