Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
May 10, 2024

Conversation

St0wy
Copy link
Contributor

@St0wy St0wy commented Apr 19, 2024

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
Copy link
Collaborator

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

@slashformotion
Copy link
Collaborator

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

@St0wy
Copy link
Contributor Author

St0wy commented Apr 27, 2024

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
Copy link
Collaborator

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

@slashformotion slashformotion merged commit e6df31d into typst-community:master May 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select "a" or "an" automatically
2 participants