Commit Graph
21 Commits
Author SHA1 Message Date
swaits b250c35f78 docs(glossy): Add Changelog to README 2025-10-26 16:00:22 -06:00
swaits 03e8e62c70 feat(glossy): Return array of pages in theme
Instead of returning an opaque context element with a fixed list of the
pages, return an array of context elements with each a page
(already unique!).
This is conceptually cleaner. Now it's the themes responsability to join
the array of unique pages however it wants. Most times, this will be a
`.join(", ")`, but could be e.g. `.first()` if the theme only wants to
show the page of the first occurance of this term.
Also update the documentation.

Breaking API change in the themes.
No visual differences (tests remain the same), but there are binary
differences.
2025-10-26 16:00:21 -06:00
swaits 68945132fb feat(glossy): Remove hide/hidden modifier
This modifier was not orthogonal with other modifiers (for example, it
could not be used together with :noindex)
Added documentation and modified test to reflect that @term[] with an
empty supplement has exactly the same result *and* is more orthogonal.

This partially reverts commit 5957432d5d.
2025-10-26 16:00:21 -06:00
swaits 45112b434f chore(glossy): bump version to 0.8.0 2025-10-26 16:00:20 -06:00
swaits 8e8723b8d1 docs(glossy): update README with newest features 2025-04-03 15:06:46 -07:00
swaits c0077ca432 docs(glossy): fix theme parameter typos in README 2025-04-03 08:37:27 -07:00
Philipp Niedermayer d90cdc1894 Update README.md 2025-02-13 18:43:38 +01:00
swaits 4e4e93e096 chore(glossy): bump version to 0.6.0
Closes [#24](https://github.com/swaits/typst-collection/issues/24)

- Fixed academic theme (no longer hardcodes a font)
- New modifiers: noref/noindex - keeps terms out of glossary
- New behavior: short/long/both no longer count against "first use"
2025-01-25 16:10:14 -07:00
swaits 5b0bdf333f doc(glossy): update docs with new 0.6.0 features
- noref/noindex
- updated theme gallery (academic changed to not specify font)
- short/long/both no longer count against "first use"
2025-01-25 16:10:14 -07:00
swaits 7ed699d2f7 chore(glossy): bumps version to 0.5.2 2025-01-07 22:54:43 -07:00
swaits 93a7794c2e fix(glossy): fix forward linking (broken themes)
Fixes [#19](https://github.com/swaits/typst-collection/issues/19).

Themes must emit `entry.label` for terms to be able to forward-link to
their glossary entrie.
2025-01-07 22:54:43 -07:00
swaits df889d8d72 feat(glossy): add sort: true parameter to glossary() 2024-12-21 22:27:07 -07:00
swaits c008b5bd86 feat(glossy): release 0.5.1 2024-12-20 12:48:19 -07:00
swaits c37c6750c6 feat(glossy): release 0.5.0
New feature:

`init-glossary()` now accepts a `format-term()` function which gives the
user control over how the short-form and long-form of the terms are
assembled based on the needed mode ("short", "long", or "both").

Change:

Default theme changed to `theme-academic`, which is probably more
generally useful than the prior (`theme-twocol`).
2024-12-20 11:28:32 -07:00
swaits 2286037bd6 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)
2024-12-18 10:15:20 -07:00
swaits 3dce3d1734 feat(glossy): add support for articles through modifiers 2024-12-18 06:39:43 -07:00
swaits 5eee23a59e chore(glossy): bump version to 0.3.0 2024-12-16 18:30:53 -07:00
swaits 0a87404a18 feat(glossy): add type-checking
- adds type-checking via the valkyrie package
- fixes handling of groups parameter on #glossary()
- new test for relevant changes
2024-12-16 18:30:09 -07:00
swaits d2e44f4131 doc(glossy): update docs on concise syntax 2024-12-16 17:46:09 -07:00
Philipp Niedermayer 91de1816e9 Allow concise entry definition
closes #13
2024-12-15 19:32:27 +00:00
swaits 274e9bad2f chore: remove preview/ directory 2024-12-10 22:21:15 +00:00