10 Commits

Author SHA1 Message Date
mkorje
333dfd505c
Add delim-size parameter to mat, vec, and cases
Takes either a function or a relative length, just like with `lr`,
`stretch`, and `accent` which was changed in the previous two commits.
The default is now much clearer to the user: `x => x * 1.1 - 0.1em`.
2025-07-08 21:05:37 +10:00
mkorje
08f1d93f9e
Allow a function as an argument to size in stretch and lr
Previously there was always a short fall when scaling delimiters, even if
the user requested a specific size. This is no longer the case; the short
fall is only present in the default for `lr` (`x => x - 0.1em`) - the
size of the delimiters is now actually what was specified in the size
argument. This also makes the default for `lr` much clearer to the user.

A slight hack was used by exploiting the `name` property in the `func`
attribute macro so that the default value in the docs for `lr.size` would
clearly show what the default function was (instead of just its name
`default_lr_size` which is meaningless and inaccessible to the user).
2025-07-08 21:00:31 +10:00
Laurenz
0a3c6939dd
Rewrite foundations of native elements (#6547) 2025-07-08 08:52:43 +00:00
Ian Wrzesinski
fecdc39846 Use SymbolElem in more places and add char cast for content 2025-01-23 16:28:29 -05:00
Max
bb38a01d06
Fix math size resolving (#5596) 2024-12-20 12:35:57 +00:00
Laurenz
be7cfc85d0
Split out four new crates (#5302) 2024-10-27 18:04:55 +00:00
Laurenz
7eebafa783 Merge typst and typst-library 2023-11-24 12:30:02 +01:00
Sébastien d'Herbais de Thun
c0f6d2004a
Content rework 2 - Electric Boogaloo (#2504) 2023-11-06 21:37:50 +01:00
HydroH
b584617c8d
Add size: argument for abs, norm, floor, ceil and round (#2292) (#2322) 2023-10-06 17:13:38 +02:00
Laurenz
b471ac7d59 First-class types
Makes types first-class values.
2023-09-11 14:40:22 +02:00