by necovek · 2y ago · 0 comments
Eg. both the article and docs at https://typst.app/docs/reference/model/ref/ use an inline reference that wouldn't work in Serbian.
Serbian (and many other languages) have suffix declensions, so while "Figure 4" is "Slika 4", when used like "in Figure 4", you really need "u Slici 4" (and lowercase, really) instead of "u Slika 4" as produced by Typst.
On the plus side, it seems to use OTF locl tables for substitution glyphs for language, though it only partially works for Serbian (might be due to bad locl tables for LinLibertine which seems to be the default font).
I am sure it's not too hard to only get the reference number (eg. @foo.context.something?), but defaults should be good or maybe per-language?
I can see how they wanted to avoid authors having to hard-code the reference type if they change eg. something from an image to a table, but it's hard to make it smart enough for any language.
Also typst knows the type of the referenced element. It's easy to write more elaborate rules that behave differently depending on the type. And the rules can also check the current language to generate localized references.
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.)
For addresses, that's usually listen in a language grammar as a rule.
So even embedding latest LLM won't solve it so it's better to leave it to the author to do the right thing.
Things like "if you ever want to translate your document from English to XXX, you will also need to port it from Typst to LaTeX" tend to be dealbreakers.
On the other hand, one can easily understand why, bein German, they assume Figure, Equation, etc. will always be capitalized.
> Typst `dif` math operator (as in dx/dt) produces upright 'd', quite unexpected to ones used to slanted 'd' tradition.
I would indeed expect an upright 'd'. It's an operator, not a variable. I don't recognize the tradition you're mentioning.