typst-community / glossarium

Glossarium is a simple typst glossary.
MIT License
41 stars 11 forks source link

Function for resetting glossary entry behavior #65

Open JKRhb opened 1 month ago

JKRhb commented 1 month ago

First of all, thank you for providing this very great package :)

In a document I am currently writing, I would like to reset the behavior of the referenced glossary entries once a new chapter begins so that entries are initially printed as they have not been used before. For that purpose, it would be great to have a function that resets the state that keeps track of whether a glossary entry has already been used before.

Would it be possible to add such a function to the package? Or is that already possible to achieve with what the package is exposing?

hbierlee commented 1 month ago

I also have this specific feature request. I made a fork which implements this for me, although I'm sure in general the design needs to be thought out more:

https://github.com/hbierlee/glossarium/tree/feature/reset-glossary

quachpas commented 1 month ago

I also have this specific feature request. I made a fork which implements this for me, although I'm sure in general the design needs to be thought out more:

https://github.com/hbierlee/glossarium/tree/feature/reset-glossary

thanks, that works out fine for this specific chapter behaviour, but probably need to implemented differently if the user needs more control over when/how the state resets