typst-community / glossarium

Glossarium is a simple typst glossary.
MIT License
29 stars 9 forks source link

Added support to "automatically" chose between a and an #34

Closed St0wy closed 4 months ago

St0wy commented 5 months ago

Fixes #23

I added two new fields on the glossary entries : artshort and artlong. They're both here so that it can be specified if "a" or "an" is needed. They default to "a".

To use it, you can call #agls("key") and it will use the correct article. I havent defined one for plurals (plus it would make more sense to do that once/if #33 is merged) since in english you generally just use the word without an article. But it could be usefull to add that feature for other languages (like French for example). Tell me if you think that could be usefull and I'll add it to the PR.

slashformotion commented 4 months ago

The plurals MR is merged, perhaps 'a'/'an' support could be directly included into the gls / glspl functions. what do you think ?

slashformotion commented 4 months ago

just a heads up, I will release the plurals support and then this one

St0wy commented 4 months ago

Maybe it could be added to gls with a parameter like show_article that would default to false, but I think there's some value on having a similar API to what's available in LaTeX. But if you have a strong preference for having it inside gls I could change my PR to be like that

slashformotion commented 4 months ago

let's keep "agls" and see what users thinks