Symbol improvements

This commit is contained in:
Laurenz 2023-01-31 13:00:20 +01:00
parent 69985e59bc
commit c2bd114914
6 changed files with 10 additions and 6 deletions

View File

@ -34,7 +34,7 @@ const ACCENT_SHORT_FALL: Em = Em::new(0.5);
/// | ------------ | --------------- | --------- |
/// | Grave | `grave` | <code>&DiacriticalGrave;</code> |
/// | Acute | `acute` | `´` |
/// | Circumflex | `circum` | `^` |
/// | Circumflex | `hat` | `^` |
/// | Tilde | `tilde` | `~` |
/// | Macron | `macron` | `¯` |
/// | Breve | `breve` | `˘` |

View File

@ -5,8 +5,7 @@ use super::*;
///
/// ## Syntax
/// This function also has dedicated syntax: Use the underscore (`_`) to
/// indicate a bottom attachment and the circumflex (`^`) to indicate a top
/// attachment.
/// indicate a bottom attachment and the hat (`^`) to indicate a top attachment.
///
/// ## Example
/// ```

View File

@ -58,6 +58,10 @@ macro_rules! ops {
limits: ops!(@limit $($tts)*),
}.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) };

View File

@ -330,7 +330,7 @@ symbols! {
// Logic.
forall: '',
exists: ['∃', "not": ''],
top: '',
top: '',
bot: '',
not: '¬',
and: [
@ -412,6 +412,7 @@ symbols! {
],
prop: '',
divides: ['', "not": ''],
compose: '',
// Miscellaneous.
diff: '',

View File

@ -150,7 +150,7 @@ symbols! {
breve: '˘',
caret: '',
caron: 'ˇ',
circum: '^',
hat: '^',
diaer: '¨',
grave: '`',
macron: '¯',

View File

@ -5,7 +5,7 @@
$ grave(a),
acute(a),
circum(a),
hat(a),
tilde(a),
macron(a),
breve(a),