appearance of references to images
This commit is contained in:
24
template.typ
24
template.typ
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user