Typst syntax: Unpack Array #5
-
|
Hi Eric, thanks for assisting me with a question I had about defining custom shorthands in a Q&A I had posted in the discussion board on Typst's repository earlier today. Would you happen to know how to unpack an array so that its elements can be used as arguments in EDIT:
#import "@preview/quick-maths:0.1.0": shorthands
#show: shorthands.with(
($>->>$, $⤖$, "bijective arrow right"),
($<-<<$, $⬻$, "bijective arrow left"),
($<-x-$, $⬾$, "crossed arrow left"),
($+-$, $plus.minus$, "+/- symbol"),
($<=$, math.arrow.l.double, "backward implication arrow. Warning: overwrites default shorthand for ≤")
)
#shorthands.print_all() // Prints all custom shorthands defined.Cheers, and thanks for developing and releasing quickmath 😃 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
The syntax for unpacking in typst is Also, you can probably use "scoped" shorthands like this: #let custom_shorthands = ()
#custom_shorthands.push(...)
#shorthands(..custom_shorthands)[
Arrows: \
...
]
#custom_shorthands.push(...)
...
#show: shorthands.with(..custom_shorthands) |
Beta Was this translation helpful? Give feedback.

The syntax for unpacking in typst is
shorthands.with(..custom_shorthands).Also, you can probably use "scoped" shorthands like this: