styling fixes

- include bib in contents
- fix page breaks between chapters
- fix colors in table of contents
This commit is contained in:
2026-06-07 17:19:49 +02:00
parent a525fe60dd
commit 1bd2d08677
5 changed files with 16 additions and 40 deletions
+2 -2
View File
@@ -43,7 +43,7 @@
#let render-bib() = { #let render-bib() = {
load-bibliography("Bibliography.bib", prefix: "cite:", full: true, style: "ieee") load-bibliography("Bibliography.bib", prefix: "cite:", full: true, style: "ieee")
heading(level: 1, outlined: false)[Spis literatury] heading(level: 1, outlined: true, numbering: none)[Spis literatury]
v(1em) v(1em)
context { context {
@@ -180,7 +180,7 @@
let render-group(title, keys, start-idx) = { let render-group(title, keys, start-idx) = {
if keys.len() > 0 [ if keys.len() > 0 [
#heading(level: 2, title, outlined: false) #heading(level: 2, title, outlined: true, numbering: none)
#grid( #grid(
columns: (auto, 1fr), columns: (auto, 1fr),
column-gutter: 0.65em, column-gutter: 0.65em,
BIN
View File
Binary file not shown.
-1
View File
@@ -19,7 +19,6 @@
#include "Chapters/2. Implementation.typ" #include "Chapters/2. Implementation.typ"
#include "Chapters/3. Tests.typ" #include "Chapters/3. Tests.typ"
#include "Chapters/4. Summary.typ" #include "Chapters/4. Summary.typ"
#pagebreak(to: "odd")
#render-bib() #render-bib()
#pagebreak() #pagebreak()
#list-of-figures() #list-of-figures()
+3 -32
View File
@@ -79,7 +79,7 @@
margin: ( margin: (
top: 3.2cm, top: 3.2cm,
bottom: 3.5cm, bottom: 3.5cm,
inside: 3.5cm, // 2.5cm tekst + 1cm bindingoffset (rozwiązuje problem marginesu z lewej z Twojego kodu) inside: 3.5cm, // 2.5cm tekst + 1cm
outside: 2.5cm, outside: 2.5cm,
), ),
@@ -88,7 +88,7 @@
let pg = counter(page).get().first() let pg = counter(page).get().first()
let is-odd = calc.odd(pg) let is-odd = calc.odd(pg)
// Czy ta strona otwiera rozdział? (brak nagłówka) // is chapter's first page?
let chapter-locs = query(heading.where(level: 1)) let chapter-locs = query(heading.where(level: 1))
let is-chapter-page = chapter-locs.any(h => counter(page).at(h.location()).first() == pg) let is-chapter-page = chapter-locs.any(h => counter(page).at(h.location()).first() == pg)
@@ -174,7 +174,7 @@
if it.level == 1 { if it.level == 1 {
// Wymuszenie nowej strony dla głównego rozdziału // Wymuszenie nowej strony dla głównego rozdziału
pagebreak(weak: true) pagebreak(to: "odd", weak: true)
v(1.5em, weak: true) v(1.5em, weak: true)
block(width: 100%, inset: (bottom: 1em, top: 7em))[ block(width: 100%, inset: (bottom: 1em, top: 7em))[
@@ -207,35 +207,6 @@
} }
} }
// ── 3.5 SPIS TREŚCI ─────────────────────────────────────
set outline(indent: auto)
show outline.entry: it => {
if it.level == 1 {
v(12pt, weak: true)
text(size: 11pt, weight: "bold", font: "Fira Sans", fill: blue-zut)[
#h(1.25cm)
#it
]
} else if it.level == 2 {
v(3pt, weak: true)
text(size: 10pt, font: "Fira Sans")[
#h(1.25cm)
#it
]
} else if it.level == 3 {
v(1pt, weak: true)
text(size: 9pt, font: "Fira Sans")[
#h(2.5cm)
#it
]
} else {
it
}
}
// ── 3.6 BLOKI KODU ────────────────────────────────────── // ── 3.6 BLOKI KODU ──────────────────────────────────────
show raw.where(block: true): it => { show raw.where(block: true): it => {
block( block(
+9 -3
View File
@@ -6,7 +6,9 @@
#set heading(numbering: "1.1") #set heading(numbering: "1.1")
#set text(font: "Fira Sans") #set text(font: "Fira Sans")
#set outline(title: text(size: 24pt, fill: color-dark-blue, weight: "regular")[Spis treści]) #set outline(title: block(text(size: 24pt, fill: color-dark-blue, weight: "regular")[Spis treści], inset: (
"bottom": 1.5em,
)))
#show outline.entry: it => { #show outline.entry: it => {
let is-lvl-1 = it.level == 1 let is-lvl-1 = it.level == 1
@@ -27,9 +29,13 @@
text(size: 12pt, fill: black, title) text(size: 12pt, fill: black, title)
} }
let page-style = text(size: 10pt, fill: color-page-num, weight: "medium", page-num) let page-style = if is-lvl-1 {
text(size: 10pt, fill: color-page-num, weight: "medium", page-num)
} else {
text(size: 10pt, fill: black, weight: "medium", page-num)
}
v(if is-lvl-1 { 14pt } else { 6pt }, weak: true) v(if is-lvl-1 { 18pt } else { 10pt }, weak: true)
link(it.element.location())[ link(it.element.location())[
#grid( #grid(