mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Add named symbols: ⌈
, ⌉
, ⌊
, ⌋
(#4267)
This commit is contained in:
parent
a2c9807159
commit
ddce645ef0
@ -187,8 +187,6 @@ pub fn module() -> Module {
|
||||
math.define_elem::<PrimesElem>();
|
||||
math.define_func::<abs>();
|
||||
math.define_func::<norm>();
|
||||
math.define_func::<floor>();
|
||||
math.define_func::<ceil>();
|
||||
math.define_func::<round>();
|
||||
math.define_func::<sqrt>();
|
||||
math.define_func::<upright>();
|
||||
|
@ -64,6 +64,14 @@ pub(crate) const SYM: &[(&str, Symbol)] = symbols! {
|
||||
spheric.rev: '⦠',
|
||||
spheric.top: '⦡',
|
||||
],
|
||||
ceil: [
|
||||
#[call(crate::math::ceil)] l: '⌈',
|
||||
r: '⌉',
|
||||
],
|
||||
floor: [
|
||||
#[call(crate::math::floor)] l: '⌊',
|
||||
r: '⌋',
|
||||
],
|
||||
|
||||
// Punctuation.
|
||||
amp: ['&', inv: '⅋'],
|
||||
|
@ -542,7 +542,7 @@ fn group_page(
|
||||
let mut outline_items = vec![];
|
||||
for name in &group.filter {
|
||||
let value = group.module().scope().get(name).unwrap();
|
||||
let Value::Func(func) = value else { panic!("not a function") };
|
||||
let Ok(ref func) = value.clone().cast::<Func>() else { panic!("not a function") };
|
||||
let func = func_model(resolver, func, &path, true);
|
||||
let id_base = urlify(&eco_format!("functions-{}", func.name));
|
||||
let children = func_outline(&func, &id_base);
|
||||
|
Loading…
x
Reference in New Issue
Block a user