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.
This commit is contained in:
6 files changed
+52
-4
No files matched your search
+4
-1
@@ -253,7 +253,7 @@ Customize glossary appearance by defining a theme with three functions:
|
||||
// Individual glossary entry
|
||||
entry: (entry, index, total) => {
|
||||
// index = entry index, total = total entries in group
|
||||
let output = [#entry.short]
|
||||
let output = [#entry.short#entry.label] // **NOTE:** Label here!
|
||||
if entry.long != none {
|
||||
output = [#output -- #entry.long]
|
||||
}
|
||||
@@ -280,6 +280,9 @@ Entry fields available to themes:
|
||||
- `label`: Term's dictionary label
|
||||
- `pages`: Linked page numbers where term appears
|
||||
|
||||
**NOTE:** If the theme does not emit `entry.label`, linking form terms to their
|
||||
glossary entry will not work.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License.
|
||||
Reference in new issue
Block a user