Skip to content

Commit f0e8d68

Browse files
q-wertzquachpas
andcommitted
Apply suggestions from code review
Co-authored-by: Pascal Quach <20374810+quachpas@users.noreply.github.com>
1 parent b38f138 commit f0e8d68

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,22 @@ graph TD;
202202
gls;
203203
gls-x["**Access values**"<br>-----------------<br>gls-key<br>gls-short<br>gls-artshort<br>gls-plural<br>gls-long<br>gls-artlong<br>gls-longplural<br>gls-description<br>gls-group<br>gls-sort<br>gls-custom];
204204
xgls["**Capitalizing, <br>Article, Plural**"<br>-----------------<br>Gls<br>agls<br>Agls<br>glspl<br>Glspl];
205-
at-syntax["**@ syntax <br> modifiers**"<br>-----------------<br>:pl<br>:short<br>:long<br>:description<br>:longplural<br>:custom];
205+
at-syntax["**@key syntax <br> modifiers**"<br>-----------------<br>@key:pl<br>@Key<br>@Key:pl<br>@key:short<br>@key:long<br>@key:description<br>@key:longplural<br>@key:custom];
206206
207207
gls --> gls-x;
208208
gls --> xgls;
209209
gls --> at-syntax;
210210
```
211211

212-
Examples usaging the typst reference syntax (`@` syntax)
212+
Usually, you will want to use Typst reference syntax (`@` syntax). This is the most practical way to reference an entry. By default, some shorthands are made available: plural, capitalize, capitalized plural, short and long. More are available: description, longplural and custom corresponding respectively to `@key:description`, `@key:longplural` and `@key:custom`.
213+
214+
This setting is managed when you print the glossary
215+
```typ
216+
print-glossary(
217+
entry-list,
218+
// default shorthands
219+
shorthands: ("plural", "capitalize", "capitalize-plural", "short", "long"),
220+
)
213221
```typ
214222
// Prints the full version on first usage, short afterwards
215223
@oidc
@@ -219,13 +227,12 @@ Examples usaging the typst reference syntax (`@` syntax)
219227
@oidc:pl
220228
```
221229

222-
The different interfaces have different default parameters which you should keep in mind when using them.
230+
The different interfaces have different default parameters which you should keep in mind when using them. In most cases, you will not need to manually set `update: false`, unless you are using `gls` in situations that create ambiguity, e.g., using `gls` in other entries' description.
223231

224232
| Interface | `update` | `link` |
225233
| --------------------------------------------- | :------: | :-----: |
226-
| `gls` | `true` | `true` |
234+
| `gls`, `Gls`, `glspl`, etc. | `true` | `true` |
227235
| Access values<br>(`gls-short`, ...) | `false` | `false` |
228-
| Capitalizing, article, plural<br>(`Gls`, ...) | `true` | `true` |
229236
| Reference syntax<br>(`@oidc:pl`, ...) | `true` | `true` |
230237

231238
### Handling plurals

0 commit comments

Comments
 (0)