diff options
| author | Max <me@mkor.je> | 2025-01-09 10:49:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-09 10:49:06 +0000 |
| commit | be6629c7cbd00b06beab2b1477c4270859906cb2 (patch) | |
| tree | 66087a899b1f2c5d90d9e72145cfdb9d55486b5d /crates/typst-library/src | |
| parent | e2b37fef33a92a7086790e04fb133472413c0c0a (diff) | |
Better math argument parsing (#5008)
Diffstat (limited to 'crates/typst-library/src')
| -rw-r--r-- | crates/typst-library/src/math/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs index 5a83c854..3b4b133d 100644 --- a/crates/typst-library/src/math/mod.rs +++ b/crates/typst-library/src/math/mod.rs @@ -82,8 +82,9 @@ use crate::text::TextElem; /// - Within them, Typst is still in "math mode". Thus, you can write math /// directly into them, but need to use hash syntax to pass code expressions /// (except for strings, which are available in the math syntax). -/// - They support positional and named arguments, but don't support trailing -/// content blocks and argument spreading. +/// - They support positional and named arguments, as well as argument +/// spreading. +/// - They don't support trailing content blocks. /// - They provide additional syntax for 2-dimensional argument lists. The /// semicolon (`;`) merges preceding arguments separated by commas into an /// array argument. @@ -92,6 +93,7 @@ use crate::text::TextElem; /// $ frac(a^2, 2) $ /// $ vec(1, 2, delim: "[") $ /// $ mat(1, 2; 3, 4) $ +/// $ mat(..#range(1, 5).chunks(2)) $ /// $ lim_x = /// op("lim", limits: #true)_x $ /// ``` |
