Skip to content

Commit

Permalink
Move figure.caption show rule to make-glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
quachpas committed Oct 25, 2024
1 parent 5892af3 commit 90bba12
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions themes/default.typ
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,12 @@
// #show: make-glossary
// ```
#let make-glossary(body) = {
// Fix figure caption alignement
show figure.where(kind: __glossarium_figure): it => if sys.version >= version(0, 12, 0) {
align(start, it.caption)
} else {
it.caption
}
// Select all figure refs and filter by __glossarium_figure
// Transform the ref to the glossary term
show ref: r => {
Expand Down Expand Up @@ -696,11 +702,6 @@
user-print-back-references: default-print-back-references,
) = {
return [
#show figure.where(kind: __glossarium_figure): it => if sys.version >= version(0, 12, 0) {
align(start, it.caption)
} else {
it.caption
}
#par(
hanging-indent: 1em,
first-line-indent: 0em,
Expand Down

0 comments on commit 90bba12

Please sign in to comment.