1
0

appearance of references to images

This commit is contained in:
2025-02-09 13:52:50 +02:00
parent 0e58f53e47
commit 1a2dc26b97

View File

@ -15,14 +15,14 @@
/// bold text /// bold text
#let bold(content) = text(weight: "bold")[#content] #let bold(content) = text(weight: "bold")[#content]
/// insert fig with label and caption /// captioned image with label derived from path
#let fig(path, caption) = { #let img(path, caption) = [
figure( #figure(
image(path), image(path),
caption: caption, caption: caption,
) )
label(path.split("/").last().split(".").first()) #label(path.split("/").last().split(".").first())
} ]
/// subjects list /// subjects list
#let subjects = ( #let subjects = (
@ -113,6 +113,19 @@
}, },
) )
// appearance of references to images
show ref: it => {
let el = it.element
if el != none and el.kind == image {
link(
el.location(),
[(див. рис. #numbering(el.numbering))],
)
} else {
it
}
}
// TODO: Maybe this will be better. Must be investigated. // TODO: Maybe this will be better. Must be investigated.
// //
// set math.equation(numbering: (..num) => // set math.equation(numbering: (..num) =>
@ -607,4 +620,3 @@
heading(title) heading(title)
doc doc
} }