From 9bdc4a7de0fb685fa2b8d02280e70aa0b5d92bf9 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 17 Apr 2023 13:25:31 +0200 Subject: Write PDF outline --- library/src/meta/figure.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'library/src/meta') diff --git a/library/src/meta/figure.rs b/library/src/meta/figure.rs index 42b32c9d..1f1499fc 100644 --- a/library/src/meta/figure.rs +++ b/library/src/meta/figure.rs @@ -173,14 +173,14 @@ impl Synthesize for FigureElem { // Determine the figure's kind. let kind = match self.kind(styles) { Smart::Auto => self - .find_figurable(vt, styles) + .find_figurable(styles) .map(|elem| FigureKind::Elem(elem.func())) .unwrap_or_else(|| FigureKind::Elem(ImageElem::func())), Smart::Custom(kind) => kind, }; let content = match &kind { - FigureKind::Elem(func) => self.find_of_elem(vt, *func), + FigureKind::Elem(func) => self.find_of_elem(*func), FigureKind::Name(_) => None, } .unwrap_or_else(|| self.body()); @@ -303,9 +303,9 @@ impl Refable for FigureElem { impl FigureElem { /// Determines the type of the figure by looking at the content, finding all /// [`Figurable`] elements and sorting them by priority then returning the highest. - pub fn find_figurable(&self, vt: &Vt, styles: StyleChain) -> Option { + pub fn find_figurable(&self, styles: StyleChain) -> Option { self.body() - .query(vt.introspector, Selector::can::()) + .query(Selector::can::()) .into_iter() .max_by_key(|elem| elem.with::().unwrap().priority(styles)) .cloned() @@ -313,9 +313,9 @@ impl FigureElem { /// Finds the element with the given function in the figure's content. /// Returns `None` if no element with the given function is found. - pub fn find_of_elem(&self, vt: &Vt, func: ElemFunc) -> Option { + pub fn find_of_elem(&self, func: ElemFunc) -> Option { self.body() - .query(vt.introspector, Selector::Elem(func, None)) + .query(Selector::Elem(func, None)) .into_iter() .next() .cloned() -- cgit v1.2.3