summaryrefslogtreecommitdiff
path: root/library/src/lib.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-22 13:26:42 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-22 13:26:42 +0100
commit83b68581461df8968e408bec1b979ed2e3a8f0c5 (patch)
tree9c36f1ccb25187ff20eac970847b554ddd01df8b /library/src/lib.rs
parenta2d77e36bab83056e3c487adfbeff161485ca47d (diff)
Math framework
Diffstat (limited to 'library/src/lib.rs')
-rw-r--r--library/src/lib.rs21
1 files changed, 2 insertions, 19 deletions
diff --git a/library/src/lib.rs b/library/src/lib.rs
index 24f3560f..f714c72b 100644
--- a/library/src/lib.rs
+++ b/library/src/lib.rs
@@ -49,24 +49,7 @@ fn scope() -> Scope {
std.def_func::<text::RawNode>("raw");
// Math.
- std.def_func::<math::MathNode>("math");
- std.def_func::<math::AccNode>("acc");
- std.def_func::<math::FracNode>("frac");
- std.def_func::<math::BinomNode>("binom");
- std.def_func::<math::ScriptNode>("script");
- std.def_func::<math::SqrtNode>("sqrt");
- std.def_func::<math::FloorNode>("floor");
- std.def_func::<math::CeilNode>("ceil");
- std.def_func::<math::VecNode>("vec");
- std.def_func::<math::CasesNode>("cases");
- std.def_func::<math::SerifNode>("serif");
- std.def_func::<math::SansNode>("sans");
- std.def_func::<math::BoldNode>("bold");
- std.def_func::<math::ItalNode>("ital");
- std.def_func::<math::CalNode>("cal");
- std.def_func::<math::FrakNode>("frak");
- std.def_func::<math::MonoNode>("mono");
- std.def_func::<math::BbNode>("bb");
+ math::define(&mut std);
// Layout.
std.def_func::<layout::PageNode>("page");
@@ -204,7 +187,7 @@ fn items() -> LangItems {
term_item: |term, description| {
layout::ListItem::Term(basics::TermItem { term, description }).pack()
},
- math: |children, block| math::MathNode { children, block }.pack(),
+ math: |body, block| math::MathNode { body, block }.pack(),
math_atom: |atom| math::AtomNode(atom).pack(),
math_script: |base, sub, sup| math::ScriptNode { base, sub, sup }.pack(),
math_frac: |num, denom| math::FracNode { num, denom }.pack(),