diff options
| author | Leedehai <18319900+Leedehai@users.noreply.github.com> | 2023-04-25 05:24:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-25 11:24:07 +0200 |
| commit | 62361b4127c39fc1b165b81f24f52b14ddaa41db (patch) | |
| tree | 830f1ef69e77c9e9fbab2337f05136fa69ed0755 /src/eval/library.rs | |
| parent | fb99090208c9aface707f9d4526f411fcb67f705 (diff) | |
Support indices preceding the base symbol, revamping #699 (#825)
Breaking change: abbreviate attach() attachment params, top -> t, bottom -> b
Diffstat (limited to 'src/eval/library.rs')
| -rw-r--r-- | src/eval/library.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/eval/library.rs b/src/eval/library.rs index 0c635864..a92d8bd1 100644 --- a/src/eval/library.rs +++ b/src/eval/library.rs @@ -87,8 +87,18 @@ pub struct LangItems { /// Matched delimiters in math: `[x + y]`. pub math_delimited: fn(open: Content, body: Content, close: Content) -> Content, /// A base with optional attachments in math: `a_1^2`. - pub math_attach: - fn(base: Content, bottom: Option<Content>, top: Option<Content>) -> Content, + #[allow(clippy::type_complexity)] + pub math_attach: fn( + base: Content, + // Positioned smartly. + top: Option<Content>, + bottom: Option<Content>, + // Fixed positions. + topleft: Option<Content>, + bottomleft: Option<Content>, + topright: Option<Content>, + bottomright: Option<Content>, + ) -> Content, /// A base with an accent: `arrow(x)`. pub math_accent: fn(base: Content, accent: char) -> Content, /// A fraction in math: `x/2`. |
