Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would just define `#let eqref(target) = "(" + ref(target, supplement: none) + ")"` and then use it as in "from #eqref(<eq-xy>) we see that..".

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.)



Agreed it could be improved fairly easily at this early stage, and even documenting 'standard recipes' would help. But I do think as a default, prefacing with a fixed string with fixed capitalisation is probably the wrong choice vs earlier systems which simply insert the reference number/letter itself and allow the user to word things correctly around that. Trying to make it do the right thing in context in a way that generalises across multiple languages is unnecessarily hard.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: