diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index db066522f..626f3d874 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -256,6 +256,9 @@ impl Layout for EquationElem { frame.size_mut().y = ascent + descent; } + // Apply metadata. + frame.meta(styles, false); + Ok(Fragment::frame(frame)) } } diff --git a/tests/ref/bugs/math-hide.png b/tests/ref/bugs/math-hide.png new file mode 100644 index 000000000..7ac5d2f10 Binary files /dev/null and b/tests/ref/bugs/math-hide.png differ diff --git a/tests/typ/bugs/math-hide.typ b/tests/typ/bugs/math-hide.typ new file mode 100644 index 000000000..8e268c977 --- /dev/null +++ b/tests/typ/bugs/math-hide.typ @@ -0,0 +1,16 @@ +// Ensure that the math is properly hidden. + +--- +#set page(height: 70pt) + +Testing $delta$ + +$ a^2 + b^2 = c^2 $ + +#hide[ + Hello + + $ f(x) := x^2 $ + + World $f(x)$ +]