summaryrefslogtreecommitdiff
path: root/library/src/math/mod.rs
diff options
context:
space:
mode:
author_rqy <renqy2002@qq.com>2023-04-07 16:30:34 +0800
committerGitHub <noreply@github.com>2023-04-07 10:30:34 +0200
commitbb30911282a44dd00def88190055d7637c6382d7 (patch)
tree0f86c8365794df8e87728cf6e07763734f569725 /library/src/math/mod.rs
parent1c324765e92c23826dff4f37d3b01761a3ac6ef4 (diff)
realize before layout_math (#637)
Diffstat (limited to 'library/src/math/mod.rs')
-rw-r--r--library/src/math/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index ac9b4ecc..3085b1ae 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -342,6 +342,11 @@ impl LayoutMath for EquationElem {
impl LayoutMath for Content {
fn layout_math(&self, ctx: &mut MathContext) -> SourceResult<()> {
+ if let Some(realized) = ctx.realize(self)? {
+ realized.layout_math(ctx)?;
+ return Ok(());
+ }
+
if let Some(children) = self.to_sequence() {
for child in children {
child.layout_math(ctx)?;