mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2026-02-04 06:22:05 +00:00
fix: reference supplements
This commit is contained in:
10
src/lib.typ
10
src/lib.typ
@@ -174,6 +174,8 @@
|
||||
..counter(el.func()).at(el.location()),
|
||||
)
|
||||
|
||||
// return el.supplement
|
||||
|
||||
|
||||
if el.func() == heading {
|
||||
return link(
|
||||
@@ -184,13 +186,15 @@
|
||||
|
||||
|
||||
let supplement = if type(it.supplement) == content {
|
||||
// supplement provided by user
|
||||
if it.supplement == [] {
|
||||
""
|
||||
"" // empty supplement
|
||||
} else {
|
||||
[~#it.supplement]
|
||||
[~#it.supplement.]
|
||||
}
|
||||
} else {
|
||||
[~#it.supplement]
|
||||
// fallback to default
|
||||
[~#el.supplement.]
|
||||
}
|
||||
|
||||
if el.func() == figure {
|
||||
|
||||
Reference in New Issue
Block a user