Tested on the latest Typst (0.15.1):
#scale(factor: 110%)[Foo]
I get an error:
Unexpected argument: factor
The factor parameter exists in the doc: Scale - Typst Documentation
Is this a bug? Should I file an issue?
Tested on the latest Typst (0.15.1):
#scale(factor: 110%)[Foo]
I get an error:
Unexpected argument: factor
The factor parameter exists in the doc: Scale - Typst Documentation
Is this a bug? Should I file an issue?
The factor argument is positional:
factorThe scaling factor for both axes, as a positional argument. This is just an optional shorthand notation for setting
xandyto the same value.
It should probably be marked more explicitly with the grey positional label, like calc.abs.value and similar
Thanks. Yes I don’t know why the doc didn’t put the positional label. This is especially confusing since factor has a default value. I didn’t know you could have default values for positional arguments. I don’t even know how to implement that.
It’s not possible for user-defined functions. In this example, scale.factor is defined here: