Skip to content

Commit

Permalink
Added an example to the README, which allows for styling only the glo…
Browse files Browse the repository at this point in the history
…ssarium references, while leaving the style of other references alone.
  • Loading branch information
bgero committed Dec 15, 2024
1 parent 8f42432 commit 0c33c7c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,18 @@ I recommend setting a show rule for the links to that your readers understand th
#show link: set text(fill: blue.darken(60%))
// links are now blue !
```

It is also possible to apply styling specifically to the glossarium references, like in this example:
```typ
#show ref: it => {
let el = it.element
if el != none and el.func() == figure and el.kind == "glossarium_entry" {
// Make the glossarium entry references dark blue
text(fill: blue.darken(60%))
} else {
// Other references as usual.
it
}
}
```
By adding `else if` clauses for different functions and kinds, each type of reference can be given a different style.

0 comments on commit 0c33c7c

Please sign in to comment.