From 2286037bd6b114acddd610c5828dab0097764168 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Wed, 18 Dec 2024 06:44:52 -0700 Subject: [PATCH] chore(glossy): release version 0.4.0 ## New features: **Articles with `a`/`an` modifier** Now you can include articles using this new modifier. The articles may be defined in your dictionary entry (fields `artcile`, and `longarticle`). But, if you don't define them, Glossy will do a reasonably good job at guessing them. This modifier is also allowed before the term. For example, you might have this term: ```yaml www: Worldwide Web ``` And you could display it with an article by any of these: ```typst @a:www @an:www @www:a @www:an ``` These, `a` and `an` are exactly equivalent. They're just provided for your convenience. Use either or both. The `a`/`an` modifier works with all modifiers except `pl` and `def`/`desc`. If you want to define custom articles for your terms, do so like this: ```typst #let glossary = ( rf: ( short: "RF", article: "an", long: "radio frequency", longarticle: "a", ) uts: ( short: "UTS", article: "a", long: "untranslatable string", longarticle: "an", ) ) ``` But again, in most cases (for English) you shouldn't need to because Glossy should usually get it right. Fixes [#12](https://github.com/swaits/typst-collection/issues/12). ## Other changes: - added test which exhausts all reference options - added panic if 'def'/'desc' used when no `description` field exists - significantly improved the (English) pluralizer function - `__gls()` function refactored, cleaned up - removed a rogue PDF ## Contributors: - [@eltos](https://github.com/eltos) - [@theRealProHacker](https://github.com/theRealProHacker) --- glossy/README.md | 2 +- glossy/tests/demo/test.typ | 2 +- glossy/typst.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glossy/README.md b/glossy/README.md index 429fbbc..a05961c 100644 --- a/glossy/README.md +++ b/glossy/README.md @@ -41,7 +41,7 @@ different goals: ### Import the package ```typst -#import "@preview/glossy:0.3.0": * +#import "@preview/glossy:0.4.0": * ``` ### Defining Glossary Terms diff --git a/glossy/tests/demo/test.typ b/glossy/tests/demo/test.typ index 961be3a..ff28dcb 100644 --- a/glossy/tests/demo/test.typ +++ b/glossy/tests/demo/test.typ @@ -17,7 +17,7 @@ short: "TPS", long: "test procedure specification", description: "A document on how to run all the test procedures"), - unused: "Unused term, which shouldn't print in the glossary." + unused: "Unused term, which shouldn't print in the glossary." ) #show: init-glossary.with(myGlossary, show-term: (body) => [#emph(body)]) diff --git a/glossy/typst.toml b/glossy/typst.toml index 022bab8..350b18f 100644 --- a/glossy/typst.toml +++ b/glossy/typst.toml @@ -1,6 +1,6 @@ [package] name = "glossy" -version = "0.3.0" +version = "0.4.0" entrypoint = "lib.typ" authors = ["Stephen Waits "] license = "MIT"