mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Symbol improvements
This commit is contained in:
parent
69985e59bc
commit
c2bd114914
@ -34,7 +34,7 @@ const ACCENT_SHORT_FALL: Em = Em::new(0.5);
|
|||||||
/// | ------------ | --------------- | --------- |
|
/// | ------------ | --------------- | --------- |
|
||||||
/// | Grave | `grave` | <code>`</code> |
|
/// | Grave | `grave` | <code>`</code> |
|
||||||
/// | Acute | `acute` | `´` |
|
/// | Acute | `acute` | `´` |
|
||||||
/// | Circumflex | `circum` | `^` |
|
/// | Circumflex | `hat` | `^` |
|
||||||
/// | Tilde | `tilde` | `~` |
|
/// | Tilde | `tilde` | `~` |
|
||||||
/// | Macron | `macron` | `¯` |
|
/// | Macron | `macron` | `¯` |
|
||||||
/// | Breve | `breve` | `˘` |
|
/// | Breve | `breve` | `˘` |
|
||||||
|
@ -5,8 +5,7 @@ use super::*;
|
|||||||
///
|
///
|
||||||
/// ## Syntax
|
/// ## Syntax
|
||||||
/// This function also has dedicated syntax: Use the underscore (`_`) to
|
/// This function also has dedicated syntax: Use the underscore (`_`) to
|
||||||
/// indicate a bottom attachment and the circumflex (`^`) to indicate a top
|
/// indicate a bottom attachment and the hat (`^`) to indicate a top attachment.
|
||||||
/// attachment.
|
|
||||||
///
|
///
|
||||||
/// ## Example
|
/// ## Example
|
||||||
/// ```
|
/// ```
|
||||||
|
@ -58,6 +58,10 @@ macro_rules! ops {
|
|||||||
limits: ops!(@limit $($tts)*),
|
limits: ops!(@limit $($tts)*),
|
||||||
}.pack()
|
}.pack()
|
||||||
);)*
|
);)*
|
||||||
|
|
||||||
|
let dif = |d| HNode::strong(THIN).pack() + UprightNode(TextNode::packed(d)).pack();
|
||||||
|
math.define("dif", dif('d'));
|
||||||
|
math.define("Dif", dif('D'));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
(@name $name:ident) => { stringify!($name) };
|
(@name $name:ident) => { stringify!($name) };
|
||||||
|
@ -330,7 +330,7 @@ symbols! {
|
|||||||
// Logic.
|
// Logic.
|
||||||
forall: '∀',
|
forall: '∀',
|
||||||
exists: ['∃', "not": '∄'],
|
exists: ['∃', "not": '∄'],
|
||||||
top: '⟙',
|
top: '⊤',
|
||||||
bot: '⊥',
|
bot: '⊥',
|
||||||
not: '¬',
|
not: '¬',
|
||||||
and: [
|
and: [
|
||||||
@ -412,6 +412,7 @@ symbols! {
|
|||||||
],
|
],
|
||||||
prop: '∝',
|
prop: '∝',
|
||||||
divides: ['∣', "not": '∤'],
|
divides: ['∣', "not": '∤'],
|
||||||
|
compose: '∘',
|
||||||
|
|
||||||
// Miscellaneous.
|
// Miscellaneous.
|
||||||
diff: '∂',
|
diff: '∂',
|
||||||
|
@ -150,7 +150,7 @@ symbols! {
|
|||||||
breve: '˘',
|
breve: '˘',
|
||||||
caret: '‸',
|
caret: '‸',
|
||||||
caron: 'ˇ',
|
caron: 'ˇ',
|
||||||
circum: '^',
|
hat: '^',
|
||||||
diaer: '¨',
|
diaer: '¨',
|
||||||
grave: '`',
|
grave: '`',
|
||||||
macron: '¯',
|
macron: '¯',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
$ grave(a),
|
$ grave(a),
|
||||||
acute(a),
|
acute(a),
|
||||||
circum(a),
|
hat(a),
|
||||||
tilde(a),
|
tilde(a),
|
||||||
macron(a),
|
macron(a),
|
||||||
breve(a),
|
breve(a),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user