Numbering for images
This commit is contained in:
@@ -284,9 +284,11 @@
|
|||||||
// ── 3.7 PODPISY RYSUNKÓW I TABEL ────────────────────────
|
// ── 3.7 PODPISY RYSUNKÓW I TABEL ────────────────────────
|
||||||
set figure(gap: 0.8em)
|
set figure(gap: 0.8em)
|
||||||
let raw-fig-counter = counter("raw-fig")
|
let raw-fig-counter = counter("raw-fig")
|
||||||
|
let img-fig-counter = counter("img-fig")
|
||||||
|
|
||||||
show heading.where(level: 1): it => {
|
show heading.where(level: 1): it => {
|
||||||
raw-fig-counter.update(1)
|
raw-fig-counter.update(1)
|
||||||
|
img-fig-counter.update(1)
|
||||||
it
|
it
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,6 +309,22 @@
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show figure.where(kind: image): it => {
|
||||||
|
// Step the custom counter
|
||||||
|
img-fig-counter.step()
|
||||||
|
|
||||||
|
// Build the number: heading-index.figure-index
|
||||||
|
let heading-num = counter(heading.where(level: 1)).display()
|
||||||
|
let fig-num = img-fig-counter.display("1")
|
||||||
|
let full-number = heading-num + "." + fig-num
|
||||||
|
|
||||||
|
it.body
|
||||||
|
v(10pt, weak: true)
|
||||||
|
align(center, block(width: auto)[
|
||||||
|
#text(weight: "bold", fill: blue-zut, font: "Fira Sans")[Rysunek #full-number:]
|
||||||
|
#text(font: "Fira Sans")[#it.caption.body]
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
// ── 3.8 TABELE ──────────────────────────────────────────
|
// ── 3.8 TABELE ──────────────────────────────────────────
|
||||||
set table(
|
set table(
|
||||||
|
|||||||
Reference in New Issue
Block a user