diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs index a4d44d000..976354e99 100644 --- a/crates/typst-library/src/math/mod.rs +++ b/crates/typst-library/src/math/mod.rs @@ -367,6 +367,9 @@ impl Refable for EquationElem { impl Outlinable for EquationElem { fn outline(&self, vt: &mut Vt) -> SourceResult> { + if !self.block(StyleChain::default()) { + return Ok(None); + } let Some(numbering) = self.numbering(StyleChain::default()) else { return Ok(None); }; diff --git a/tests/ref/meta/outline.png b/tests/ref/meta/outline.png index bf9c4abeb..38dbf26ea 100644 Binary files a/tests/ref/meta/outline.png and b/tests/ref/meta/outline.png differ diff --git a/tests/typ/meta/outline.typ b/tests/typ/meta/outline.typ index 73b771429..1d0bcf75e 100644 --- a/tests/typ/meta/outline.typ +++ b/tests/typ/meta/outline.typ @@ -2,25 +2,33 @@ #set heading(numbering: "(1/a)") #show heading.where(level: 1): set text(12pt) #show heading.where(level: 2): set text(10pt) +#set math.equation(numbering: "1") #outline() +#outline(title: [Figures], target: figure) +#outline(title: [Equations], target: math.equation) -= Einleitung += Introduction #lorem(12) -= Analyse += Analysis #lorem(10) #[ #set heading(outlined: false) - == Methodik + == Methodology #lorem(6) ] -== Verarbeitung -#lorem(4) +== Math +$x$ is a very useful constant. See it in action: +$ x = x $ -== Programmierung +== Interesting figures +#figure(rect[CENSORED], kind: image, caption: [A picture showing a programmer at work.]) +#figure(table[1x1], caption: [A very small table.]) + +== Programming ```rust fn main() { panic!("in the disco"); @@ -33,5 +41,5 @@ Ok ... // Ensure 'bookmarked' option doesn't affect the outline #set heading(numbering: "(I)", bookmarked: false) -= #text(blue)[Zusammen]fassung += #text(blue)[Sum]mary #lorem(10)