diff --git a/Thesis/style.typ b/Thesis/style.typ index ca00daf..2d94e56 100644 --- a/Thesis/style.typ +++ b/Thesis/style.typ @@ -284,9 +284,11 @@ // ── 3.7 PODPISY RYSUNKÓW I TABEL ──────────────────────── set figure(gap: 0.8em) let raw-fig-counter = counter("raw-fig") + let img-fig-counter = counter("img-fig") show heading.where(level: 1): it => { raw-fig-counter.update(1) + img-fig-counter.update(1) 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 ────────────────────────────────────────── set table(