Fix heading styling

This commit is contained in:
2026-06-05 13:34:58 +02:00
parent 1aebf20019
commit 556aa527c8
4 changed files with 78 additions and 9 deletions
+2 -3
View File
@@ -43,7 +43,7 @@
#let render-bib() = {
load-bibliography("Bibliography.bib", prefix: "cite:", full: true, style: "ieee")
heading(level: 1)[Spis literatury]
heading(level: 1, outlined: false)[Spis literatury]
v(1em)
context {
@@ -180,7 +180,7 @@
let render-group(title, keys, start-idx) = {
if keys.len() > 0 [
== #title
#heading(level: 2, title, outlined: false)
#grid(
columns: (auto, 1fr),
column-gutter: 0.65em,
@@ -191,7 +191,6 @@
let entry = get-entry(k)
if entry == none { return () }
let num = start-idx + i + 1
// Pamiętaj: musisz użyć format-custom, który wkleiłeś wyżej!
([\[#num\]], [#format-custom(entry)#label("cite:" + k)])
})
.flatten()
BIN
View File
Binary file not shown.
+3 -2
View File
@@ -18,6 +18,7 @@
#include "Chapters/2. Implementation.typ"
#include "Chapters/3. Tests.typ"
#include "Chapters/4. Summary.typ"
])
#render-bib()
#pagebreak(to: "odd")
#list-of-figures()
])
+71 -2
View File
@@ -168,7 +168,7 @@
set heading(numbering: "1.1")
show heading: it => {
let num = if it.numbering != none {
let num = if it.numbering != none and it.outlined {
counter(heading).display(it.numbering)
}
@@ -336,6 +336,75 @@
body
} // /zut-template
/// Spis rysunków wywołaj jako ostatni element wewnątrz zut-template.
///
/// Wyszukuje wszystkie figure(kind: image) w dokumencie i odtwarza
/// numery X.Y identyczne z tymi generowanymi przez show figure.where(kind: image)
/// w zut-template.
#let list-of-figures() = {
[
#set heading(numbering: none)
#show heading: it => {
v(1em)
block(width: 100%, inset: (bottom: 3em, top: 7em, left: 2em))[
#align(left)[
#text(size: 25pt, fill: blue-zut, weight: "regular", font: "Fira Sans", it.body)
]
]
}
#heading(level: 1, outlined: false)[Spis rysunków]
]
context {
let all-figs = query(figure.where(kind: image))
let local = 1
let prev-ch = -1
for fig in all-figs {
let ch = counter(heading.where(level: 1)).at(fig.location()).first()
if ch != prev-ch {
local = 0
prev-ch = ch
}
local = local + 1
let full-number = str(ch) + "." + str(local)
let pg = counter(page).at(fig.location()).first()
let cap = fig.caption.body
v(8pt, weak: true)
link(fig.location())[
#grid(
columns: (3em, 1fr, auto),
align: (left, left, right),
text(
size: 11pt,
weight: "regular",
font: "Fira Sans",
)[#full-number],
// Podpis + wypełnienie kropkami
[
#text(size: 11pt, font: "Fira Sans")[#cap]
#box(width: 1fr, inset: (x: 0pt))[
#text[#repeat[ . ]]
]
],
// Numer strony
text(
size: 10pt,
weight: "regular",
font: "Fira Sans",
)[#pg],
)
]
}
}
}
/// Funkcja rysująca abstrakt polska wersja u góry, angielska na dole, jedna strona A4.
///
/// Parametry:
@@ -368,7 +437,7 @@
set text(font: "New Computer Modern", size: 12pt, lang: "pl")
set par(justify: true, leading: 0.65em)
set heading(numbering: none)
set heading(numbering: none, outlined: false)
show heading: it => {
if it.level == 1 {