mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Make more characters stretchable by mid() (#4092)
This commit is contained in:
parent
03e3f01d54
commit
58633bf9ff
@ -122,10 +122,12 @@ impl LayoutMath for Packed<MidElem> {
|
|||||||
MathFragment::Glyph(glyph) => {
|
MathFragment::Glyph(glyph) => {
|
||||||
let mut new = glyph.clone().into_variant();
|
let mut new = glyph.clone().into_variant();
|
||||||
new.mid_stretched = Some(false);
|
new.mid_stretched = Some(false);
|
||||||
|
new.class = MathClass::Fence;
|
||||||
*fragment = MathFragment::Variant(new);
|
*fragment = MathFragment::Variant(new);
|
||||||
}
|
}
|
||||||
MathFragment::Variant(variant) => {
|
MathFragment::Variant(variant) => {
|
||||||
variant.mid_stretched = Some(false);
|
variant.mid_stretched = Some(false);
|
||||||
|
variant.class = MathClass::Fence;
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@ -48,9 +48,9 @@ $ lr(
|
|||||||
--- math-lr-mid ---
|
--- math-lr-mid ---
|
||||||
// Test middle functions
|
// Test middle functions
|
||||||
$ { x mid(|) sum_(i=1)^oo phi_i (x) < 1 } \
|
$ { x mid(|) sum_(i=1)^oo phi_i (x) < 1 } \
|
||||||
{ integral |x| dif x
|
{ integral |dot|
|
||||||
mid(bar.v.double)
|
mid(bar.v.double)
|
||||||
floor(hat(A) mid(|) { x mid(|) y } mid(|) A) } $
|
floor(hat(I) mid(slash) { dot mid(|) dot } mid(|) I/n) } $
|
||||||
|
|
||||||
--- math-lr-unbalanced ---
|
--- math-lr-unbalanced ---
|
||||||
// Test unbalanced delimiters.
|
// Test unbalanced delimiters.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user