Compare commits

...
Author SHA1 Message Date
swaits 138566c506 fix(glossy): release 0.4.1 2024-12-20 12:36:46 -07:00
swaits fd4b7ceed6 fix(glossy): use codepoints (not bytes!) in article code
Fixes [#18](https://github.com/swaits/typst-collection/issues/18)
2024-12-20 12:36:46 -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!
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 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 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
swaits 7c9ab5f046 chore: rm sync.sh, not applicable any more 2024-12-10 22:25:28 +00:00
swaits a2a9ad0eed doc(README): add swank-tex to the package directory 2024-12-10 22:23:41 +00:00
swaits 274e9bad2f chore: remove preview/ directory 2024-12-10 22:21:15 +00:00
swaits 78c5b8a000 chore: bring all branches back together 2024-12-10 22:19:46 +00:00
swaits 53c0206a03 feat(swank-tex): 0.1.0 2024-12-10 22:09:57 +00:00
swaits 3107573ef2 feat(rfc-vibe): 0.1.0 2024-12-10 22:09:15 +00:00
swaits 6ea69a0ddb feat(pro-letter): 0.1.1 2024-12-10 22:07:36 +00:00
swaits 6231fe43fb feat(pro-letter): 0.1.0 2024-12-10 21:59:22 +00:00
swaits 155568c435 feat(finely-crafted-cv): 0.1.0 2024-12-10 21:56:46 +00:00
swaits 248c520952 feat(codely-languages): 0.1.3 2024-12-10 21:54:54 +00:00
swaits 86f16a7ac0 feat(glossy): 0.2.2 2024-12-10 20:45:18 +00:00
swaits bf97dcdbab feat(glossy): 0.2.1 2024-12-10 20:45:05 +00:00
swaits 0adcf0bdc0 feat(glossy): 0.2.0 2024-12-10 20:44:56 +00:00
swaits d30225f4e6 feat(glossy): 0.1.2 2024-12-10 20:44:44 +00:00
swaits 347d44b5da feat(glossy): 0.1.1 2024-12-10 20:44:16 +00:00
swaits 927c52d402 feat(glossy): 0.1.0 2024-12-10 20:37:43 +00:00
258 changed files with 2109 additions and 5531 deletions

No files matched your search

+2
View File
@@ -7,5 +7,7 @@ tasks:
- mirror-to-github: |
cd ~/typst-collection
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
# Explicitly fetch all branches & tags
git fetch origin '+refs/heads/*:refs/heads/*' '+refs/tags/*:refs/tags/*' --prune
git remote add github git@github.com:swaits/typst-collection.git
git push --mirror github
+3 -1
View File
@@ -2,7 +2,7 @@
A collection of `typst` templates and packages by [swaits](https://swaits.com/about).
Everything in this collections is available for use at the [`typst`
Everything in this collection is available for use at the [`typst`
universe](https://typst.app/universe/). For details on each, please visit the
links below to their main page.
@@ -15,6 +15,8 @@ links below to their main page.
glossary system with easily customizable output.
- [**rfc-vibe**](https://typst.app/universe/package/rfc-vibe): Bring RFC language
into everyday docs.
- [**swank-tex**](https://typst.app/universe/package/swank-tex): Render those
funky logos for TeX, LaTeX, and friends.
## Templates
File renamed without changes.
File renamed without changes.
@@ -10,10 +10,10 @@ Pretty simple. Import `codly`. Initialize it. Import `codly-languages`.
Configure `codly` with the languages. Like this:
```typst
#import "@preview/codly:1.0.0": *
#import "@preview/codly:1.1.0": *
#show: codly-init
#import "@preview/codly-languages:0.1.2": *
#import "@preview/codly-languages:0.1.3": *
#codly(languages: codly-languages)
```
File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 995 B

After

Width:  |  Height:  |  Size: 995 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 657 B

After

Width:  |  Height:  |  Size: 657 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 290 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 464 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 851 B

After

Width:  |  Height:  |  Size: 851 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 778 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 710 B

After

Width:  |  Height:  |  Size: 710 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 519 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 973 B

After

Width:  |  Height:  |  Size: 973 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 349 B

After

Width:  |  Height:  |  Size: 349 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 778 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 345 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 635 B

After

Width:  |  Height:  |  Size: 635 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 607 B

After

Width:  |  Height:  |  Size: 607 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 895 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 934 B

After

Width:  |  Height:  |  Size: 934 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 608 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 491 B

After

Width:  |  Height:  |  Size: 491 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 376 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 716 B

After

Width:  |  Height:  |  Size: 716 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 943 B

After

Width:  |  Height:  |  Size: 943 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 482 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 525 B

After

Width:  |  Height:  |  Size: 525 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 810 B

After

Width:  |  Height:  |  Size: 810 B

File renamed without changes.

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 902 B

@@ -4,7 +4,7 @@
// To use:
//
// ```typst
// #import "@preview/codly:1.0.0": *
// #import "@preview/codly:1.1.0": *
// #show: codly-init
//
// #import "codly-languages.typ": *
Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

After

Width:  |  Height:  |  Size: 254 KiB

@@ -1,5 +1,5 @@
#import "/lib.typ": *
#import "@preview/codly:1.0.0": *
#import "@preview/codly:1.1.0": *
#show: codly-init
#codly(languages: codly-languages)
File renamed without changes.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB

@@ -1,6 +1,6 @@
[package]
name = "codly-languages"
version = "0.1.2"
version = "0.1.3"
entrypoint = "lib.typ"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
File renamed without changes.
File renamed without changes.
Loaded 100 of 258 files, more files were not shown because too many files have changed in this diff. Show more