Support bmod and pmod
This commit is contained in:
1 parent
7376acffb2
commit
df511602cf
1 file changed
+11
@@ -1277,6 +1277,17 @@ mod tests {
|
|||||||
assert_eq!(plain.width, numbered.width);
|
assert_eq!(plain.width, numbered.width);
|
||||||
assert_eq!(plain.height, numbered.height);
|
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]
|
#[test]
|
||||||
fn operatorname_star_does_not_emit_a_symbol() {
|
fn operatorname_star_does_not_emit_a_symbol() {
|
||||||
let font = Cmr10Metrics::default();
|
let font = Cmr10Metrics::default();
|
||||||
|
|||||||
Reference in new issue
Block a user