summaryrefslogtreecommitdiff
path: root/library/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/math')
-rw-r--r--library/src/math/mod.rs6
-rw-r--r--library/src/math/tex.rs3
2 files changed, 5 insertions, 4 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index 7136c8b9..9d25d485 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -30,7 +30,7 @@ impl MathNode {
}
impl Show for MathNode {
- fn show(&self, _: Tracked<dyn World>, styles: StyleChain) -> Content {
+ fn show(&self, _: &mut Vt, _: &Content, styles: StyleChain) -> Content {
let mut map = StyleMap::new();
map.set_family(FontFamily::new("NewComputerModernMath"), styles);
@@ -51,11 +51,11 @@ impl Show for MathNode {
impl Layout for MathNode {
fn layout(
&self,
- world: Tracked<dyn World>,
+ vt: &mut Vt,
styles: StyleChain,
_: &Regions,
) -> SourceResult<Fragment> {
- layout_tex(world, &self.texify(), self.display, styles)
+ layout_tex(vt, &self.texify(), self.display, styles)
}
}
diff --git a/library/src/math/tex.rs b/library/src/math/tex.rs
index 5f332f3c..b2b6486e 100644
--- a/library/src/math/tex.rs
+++ b/library/src/math/tex.rs
@@ -35,13 +35,14 @@ impl Texify for Content {
/// Layout a TeX formula into a frame.
pub fn layout_tex(
- world: Tracked<dyn World>,
+ vt: &Vt,
tex: &str,
display: bool,
styles: StyleChain,
) -> SourceResult<Fragment> {
// Load the font.
let variant = variant(styles);
+ let world = vt.world();
let mut font = None;
for family in families(styles) {
font = world.book().select(family, variant).and_then(|id| world.font(id));