Commit Graph
119 Commits
Author SHA1 Message Date
swaits a2f2b6e59c merge: published versions codly-0.1.4, run-liners:0.1.0, and glossy-0.5.2 to main codly-languages-0.1.4 glossy-0.5.2 run-liners-0.1.0 2025-01-09 12:39:32 -07:00
swaits 9bb814f108 test(codly-languages): add test for cuda+cu 2025-01-08 17:26:17 -07:00
Tom c306e56ec6 feat(codly-languages): added cuda 2025-01-08 17:26:08 -07:00
swaits 7ed699d2f7 chore(glossy): bumps version to 0.5.2 2025-01-07 22:54:43 -07:00
swaits 257926d7a5 chore(glossy): exclude bin dir in package manifest 2025-01-07 22:54:43 -07:00
swaits 647fddbf18 test(glossy): update test refs (minor layout diffs only) 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 40cc652aeb test(glossy): add bin/autotest.sh (uses watchexec) 2025-01-07 22:54:43 -07:00
swaits 600925157a fix(codly-languages): replace awk/groovy icons with smaller file sized icons 2025-01-07 22:54:20 -07:00
swaits ed552faef2 chore(codly-languages): bump version to 0.1.4 2025-01-07 22:54:19 -07:00
swaits 5964bc082a feat(codly-languages): add Lisp
Closes [#20](https://github.com/swaits/typst-collection/issues/20).
2025-01-07 22:54:19 -07:00
swaits 41e1c184e8 chore(codly-language): change to codly:1.1.1 2025-01-07 22:54:19 -07:00
swaits 5d8eb4763e feat(run-liners): initial implementation 2025-01-07 22:52:47 -07:00
swaits 05a66f4956 test(glossy): repair utf-handling test 2024-12-22 13:40:13 -07:00
swaits df889d8d72 feat(glossy): add sort: true parameter to glossary() glossy-0.5.1 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 842166c211 fix(glossy): use codepoints (not bytes!) in article code
Fixes [#18](https://github.com/swaits/typst-collection/issues/18)
2024-12-20 12:37:21 -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`).
glossy-0.5.0
2024-12-20 11:28:32 -07:00
swaits 03d82458bb feat(glossy): change default theme to theme-academic 2024-12-20 11:28:32 -07:00
swaits 725f657f49 feat(glossy): adds format-term customizability
Idea [from Discord
conversation](https://discord.com/channels/1054443721975922748/1318670789150642246/1319338465757757562).

Let's users more precisely control how short-form and long-form terms
are used based on the mode ("short", "long", or "both").

Defaults to `__default-format-term()` as below:

```typst
// Formats a term string based on the specified mode.
//
// Given mode, long-form, and short-form, this function returns the formatted
// term based on the mode. When mode is ...
//
// - "short" -> returns "short-form"
// - "long" -> returns "long-form"
// - "both" -> returns "short-form (long-form)"
//
// Parameters:
//   mode (string): The mode in which to format the term. Possible values are "short", "long", or "both".
//   short-form (string): The short form of the term.
//   long-form (string): The long form of the term.
//
// Returns:
//   string: The formatted term based on the specified mode.
//
#let __default-format-term(mode, short-form, long-form) = {
    if mode == "short" {
      short-form
    } else if mode == "long" {
      long-form
    } else {
      // mode assumed to be "both"
      long-form + " (" + short-form + ")"
    }
}
```
2024-12-20 11:28:32 -07:00
swaits cf139b66f6 chore(glossy): rm trailing whitespace 2024-12-20 11:28:31 -07:00
swaits 461439d2f9 chore: update .build.yml (missing cd into repo dir) 2024-12-19 10:54:12 -07:00
swaits 607814713a chore: update .build.yml (change $HOME for ~) 2024-12-19 10:52:13 -07:00
swaits 4d94a3f7f2 chore: update .build.yml (remove duplicate clone) 2024-12-19 10:48:11 -07:00
swaits bc011bfa6b chore: update .build.yml 2024-12-19 10:44:36 -07:00
swaits 1e1cb91163 feat(glossy): terms now link to glossary entries
- Merges [16](https://github.com/swaits/typst-collection/pull/16).
- Fixes [3](https://github.com/swaits/typst-collection/issues/3).

A big PR from [@eltos](https://github.com/eltos)!

This adds labels for each `key`, so that auto-complete (in the typst.app
/ `typst-ide`) works properly. It also makes it so terms can link to
their glossary entry. In the case that terms are used but no glossary is
shown (which is a core feature of Glossy), placeholder labels are used
so that the auto-complete still works.

All tests, but one (theme-gallery), passed straight from the PR. The
ddiff in the `theme-gallery` test were non-visible (ie a few pixels),
making it effectively passing too. Updated that test so it passes, and
updated the theme screenshot to match its output as well.

Huge thanks to [@eltos](https://github.com/eltos) who demonstrates a
deep understanding of Typst!
glossy-0.4.0
2024-12-19 09:36:49 -07:00
Philipp Niedermayer 255bda30d4 Typo 2024-12-18 20:21:27 +00:00
Philipp Niedermayer 2b6debb7d1 Make terms clickable links to glossary list 2024-12-18 20:07:01 +00:00
Philipp Niedermayer 80eeb9240c Fix intendation 2024-12-18 20:07:01 +00:00
Philipp Niedermayer 76fb6b9ea7 Simplifies term usage tracking
- Uniqfies the duplicate term usage tracking via counter + state to just using the counter. Refreactor the code with the two methods "mark_term_used" and "is_term_used".
2024-12-18 20:06:53 +00:00
Philipp Niedermayer 16ceebdc70 Simply label usage
- Adds a label with the entry key for autocompletion
  - either in the glossary (if it is visible and there is a corresponding entry)
  - or invisible during init-glossary
- Use a single label for all usages of the entry in the text. This simplifies the back-referencing logic significantly and also avoids cluttering the auto-complete list

closes https://github.com/swaits/typst-collection/issues/3
2024-12-18 20:06:53 +00: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 a8e0ef7c02 test(glossy): add test to exhaust all reference options 2024-12-18 10:14:18 -07:00
swaits 3dce3d1734 feat(glossy): add support for articles through modifiers 2024-12-18 06:39:43 -07:00
swaits ba8fdda1bf feat(glossy): improve pluralize 2024-12-18 06:08:52 -07:00
swaits e14331cfc0 feat(glossy): add utility for determining indefinite articles in English 2024-12-18 06:08:51 -07:00
swaits b1aa11705c chore(glossy): cleanup rogue PDF 2024-12-18 06:08:51 -07:00
swaits 64fbdce1d2 fix(rfc-vibe): thumbnail update rfc-vibe-0.1.0 2024-12-18 06:05:11 -07:00
swaits 62741c691c doc(README): typo fix 2024-12-17 21:42:51 -07:00
swaits f018aebc7b fix(rfc-vibe): typo - thank you theRealProHacker
Merge pull request #15 from theRealProHacker/patch-1

Typo in /tests/basic-output/test.typ
2024-12-17 12:46:36 -07:00
theRealProHacker bc06eeaaf9 Typo in /tests/basic-output/test.typ 2024-12-17 12:46:36 -07:00
swaits 95b21505cb doc(glossy): cleanup some stale TODOs 2024-12-17 12:46:36 -07:00
swaits 5eee23a59e chore(glossy): bump version to 0.3.0 glossy-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
swaits 7f1d1d711a test(glossy): add tests for concise syntax 2024-12-16 17:45:40 -07:00
Philipp Niedermayer 91de1816e9 Allow concise entry definition
closes #13
2024-12-15 19:32:27 +00:00
swaits f4b7cc1374 chore: recreate sync.sh for new dir scheme 2024-12-11 00:24:46 +00:00
swaits 9645626ee5 chore: try (again) to make github mirroring include all branches 2024-12-10 22:46:36 +00:00
swaits 4fdd6e2ccd chore: try to make github mirroring include all branches 2024-12-10 22:41:52 +00:00