typst-community / glossarium

Glossarium is a simple typst glossary.
MIT License
37 stars 10 forks source link

Deprecate `state.final()` and `query(..., loc)` + add missing panic for empty attribute + formatting #52

Closed quachpas closed 1 month ago

quachpas commented 2 months ago

@slashformotion What do you think about deprecating usage of state.final with a new user function register-glossary? Could be a step towards management of multiple glossaries at the same time.

 #import "@preview/glossarium:0.4.0": make-glossary, register-glossary, print-glossary, gls, glspl
 #show: make-glossary
+ #let entry-list = (...)
+ #register-glossary(entry-list)
... // Your document body
 #print-glossary(
- (
-   ...
- )
+  entry-list
 )