Attribute table
This commit is contained in:
27
template.typ
27
template.typ
@ -101,6 +101,8 @@
|
||||
|
||||
// figures
|
||||
set figure.caption(separator: [ -- ])
|
||||
show figure.where(kind: table): set figure.caption(position: top)
|
||||
show figure.caption.where(kind: table): set align(left)
|
||||
|
||||
let img = counter("image")
|
||||
let tab = counter("table")
|
||||
@ -118,17 +120,26 @@
|
||||
},
|
||||
)
|
||||
|
||||
// appearance of references to images
|
||||
// appearance of references to images and tables
|
||||
show ref: it => {
|
||||
let el = it.element
|
||||
if el != none and el.kind == image {
|
||||
link(
|
||||
el.location(),
|
||||
[(див. рис. #numbering(el.numbering))],
|
||||
)
|
||||
} else {
|
||||
it
|
||||
|
||||
if el == none or not el.has("kind") {
|
||||
return it
|
||||
}
|
||||
|
||||
let el_name = if el.kind == image {
|
||||
"рис."
|
||||
} else if el.kind == table {
|
||||
"таблицю"
|
||||
} else {
|
||||
return it
|
||||
}
|
||||
|
||||
link(
|
||||
el.location(),
|
||||
[(див. #el_name #numbering(el.numbering))],
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: Maybe this will be better. Must be investigated.
|
||||
|
Reference in New Issue
Block a user