diff options
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/mod.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 27eeb695..97e5548e 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -298,13 +298,12 @@ impl Refable for EquationElem { fn reference( &self, vt: &mut Vt, - styles: StyleChain, supplement: Option<Content>, + lang: Lang, ) -> SourceResult<Content> { // first we create the supplement of the heading - let mut supplement = supplement.unwrap_or_else(|| { - TextElem::packed(self.local_name(TextElem::lang_in(styles))) - }); + let mut supplement = + supplement.unwrap_or_else(|| TextElem::packed(self.local_name(lang))); // we append a space if the supplement is not empty if !supplement.is_empty() { @@ -312,7 +311,7 @@ impl Refable for EquationElem { }; // we check for a numbering - let Some(numbering) = self.numbering(styles) else { + let Some(numbering) = self.numbering(StyleChain::default()) else { bail!(self.span(), "only numbered equations can be referenced"); }; @@ -324,11 +323,11 @@ impl Refable for EquationElem { Ok(supplement + numbers) } - fn numbering(&self, styles: StyleChain) -> Option<Numbering> { - self.numbering(styles) + fn numbering(&self) -> Option<Numbering> { + self.numbering(StyleChain::default()) } - fn counter(&self, _: StyleChain) -> Counter { + fn counter(&self) -> Counter { Counter::of(Self::func()) } } |
