|
|
|
|
|
by qhwudbebd
618 days ago
|
|
I played with this briefly, and saw that supplement can also take a function, which presumable how you make @wibble return '(34)' instead of 'Equation 34'? The function is passed the equation itself, so supplement: x => x makes the reference identical to the whole equation (!), but it wasn't obvious to me how to extract just the equation number from an equation x? This is a really common idiom in mathematical writing: "from (1) we see that..." instead of "from Equation 1 we see that". (Randomly capitalising 'Equation' here is another controversial implication of using a fixed word string as a supplement.) |
|
You can probably do that with a function given as supplement but it looks a bit involved, I think you'd have to do something like in this example: https://typst.app/docs/reference/model/ref/#customization
(I think the reference system is an area where things can be improved to main some common use cases simpler.)