summaryrefslogtreecommitdiff
path: root/library/src/math/matrix.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-29 16:14:04 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-29 17:44:50 +0100
commit60dfe8f8931ca0a18f07e281bdd9751fe61e5adf (patch)
tree5184c386d8ec779b9a91f3f2a7da80dab2f06aae /library/src/math/matrix.rs
parent8fbfa594e072aba384becaf5f4bd358bcc2ebc68 (diff)
Fix math styling
Diffstat (limited to 'library/src/math/matrix.rs')
-rw-r--r--library/src/math/matrix.rs20
1 files changed, 1 insertions, 19 deletions
diff --git a/library/src/math/matrix.rs b/library/src/math/matrix.rs
index 45ebdda7..72ef0253 100644
--- a/library/src/math/matrix.rs
+++ b/library/src/math/matrix.rs
@@ -39,20 +39,11 @@ impl VecNode {
fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {
Ok(Self(args.all()?).pack())
}
-
- fn field(&self, name: &str) -> Option<Value> {
- match name {
- "elements" => {
- Some(Value::Array(self.0.iter().cloned().map(Value::Content).collect()))
- }
- _ => None,
- }
- }
}
impl LayoutMath for VecNode {
fn layout_math(&self, ctx: &mut MathContext) -> SourceResult<()> {
- let delim = ctx.outer.get(Self::DELIM);
+ let delim = ctx.styles().get(Self::DELIM);
layout(ctx, &self.0, Align::Center, Some(delim.open()), Some(delim.close()))
}
}
@@ -86,15 +77,6 @@ impl CasesNode {
fn construct(_: &Vm, args: &mut Args) -> SourceResult<Content> {
Ok(Self(args.all()?).pack())
}
-
- fn field(&self, name: &str) -> Option<Value> {
- match name {
- "branches" => {
- Some(Value::Array(self.0.iter().cloned().map(Value::Content).collect()))
- }
- _ => None,
- }
- }
}
impl LayoutMath for CasesNode {