summaryrefslogtreecommitdiff
path: root/library/src/math
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-08 10:54:04 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-08 11:02:27 +0100
commite5eab73374880077971f3f22acbdd3d302877128 (patch)
tree07aa926b27032d6bcd82486d664dfd4161ccbd3e /library/src/math
parent1b2b53ecb91a9bd7fb3493e471ae03cd142a7c03 (diff)
Streamline field names
Diffstat (limited to 'library/src/math')
-rw-r--r--library/src/math/attach.rs8
-rw-r--r--library/src/math/matrix.rs8
-rw-r--r--library/src/math/mod.rs2
3 files changed, 9 insertions, 9 deletions
diff --git a/library/src/math/attach.rs b/library/src/math/attach.rs
index 9181ab7c..7ba1484a 100644
--- a/library/src/math/attach.rs
+++ b/library/src/math/attach.rs
@@ -79,12 +79,12 @@ pub struct ScriptsNode {
/// The base to attach the scripts to.
#[positional]
#[required]
- pub base: Content,
+ pub body: Content,
}
impl LayoutMath for ScriptsNode {
fn layout_math(&self, ctx: &mut MathContext) -> SourceResult<()> {
- self.base().layout_math(ctx)
+ self.body().layout_math(ctx)
}
}
@@ -102,12 +102,12 @@ pub struct LimitsNode {
/// The base to attach the limits to.
#[positional]
#[required]
- pub base: Content,
+ pub body: Content,
}
impl LayoutMath for LimitsNode {
fn layout_math(&self, ctx: &mut MathContext) -> SourceResult<()> {
- self.base().layout_math(ctx)
+ self.body().layout_math(ctx)
}
}
diff --git a/library/src/math/matrix.rs b/library/src/math/matrix.rs
index 3e257385..c7303735 100644
--- a/library/src/math/matrix.rs
+++ b/library/src/math/matrix.rs
@@ -20,7 +20,7 @@ const VERTICAL_PADDING: Ratio = Ratio::new(0.1);
pub struct VecNode {
/// The elements of the vector.
#[variadic]
- pub elements: Vec<Content>,
+ pub children: Vec<Content>,
/// The delimiter to use.
///
@@ -36,7 +36,7 @@ pub struct VecNode {
impl LayoutMath for VecNode {
fn layout_math(&self, ctx: &mut MathContext) -> SourceResult<()> {
let delim = ctx.styles().get(Self::DELIM);
- let frame = layout_vec_body(ctx, &self.elements(), Align::Center)?;
+ let frame = layout_vec_body(ctx, &self.children(), Align::Center)?;
layout_delimiters(ctx, frame, Some(delim.open()), Some(delim.close()))
}
}
@@ -141,7 +141,7 @@ impl LayoutMath for MatNode {
pub struct CasesNode {
/// The branches of the case distinction.
#[variadic]
- pub branches: Vec<Content>,
+ pub children: Vec<Content>,
/// The delimiter to use.
///
@@ -157,7 +157,7 @@ pub struct CasesNode {
impl LayoutMath for CasesNode {
fn layout_math(&self, ctx: &mut MathContext) -> SourceResult<()> {
let delim = ctx.styles().get(Self::DELIM);
- let frame = layout_vec_body(ctx, &self.branches(), Align::Left)?;
+ let frame = layout_vec_body(ctx, &self.children(), Align::Left)?;
layout_delimiters(ctx, frame, Some(delim.open()), None)
}
}
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs
index d719cb1a..6f5e5907 100644
--- a/library/src/math/mod.rs
+++ b/library/src/math/mod.rs
@@ -242,7 +242,7 @@ impl LayoutMath for Content {
let prev_size = ctx.size;
ctx.map.apply(prev_map.clone());
ctx.size = ctx.styles().get(TextNode::SIZE);
- styled.sub().layout_math(ctx)?;
+ styled.body().layout_math(ctx)?;
ctx.size = prev_size;
ctx.map = prev_map;
return Ok(());