Compare commits

..

2 Commits

Author SHA1 Message Date
oschly 29dc16413e remove headers from page breaks 2026-06-07 17:46:42 +02:00
oschly 1bd2d08677 styling fixes
- include bib in contents
- fix page breaks between chapters
- fix colors in table of contents
2026-06-07 17:19:49 +02:00
5 changed files with 31 additions and 41 deletions
+2 -2
View File
@@ -43,7 +43,7 @@
#let render-bib() = {
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)
context {
@@ -180,7 +180,7 @@
let render-group(title, keys, start-idx) = {
if keys.len() > 0 [
#heading(level: 2, title, outlined: false)
#heading(level: 2, title, outlined: true, numbering: none)
#grid(
columns: (auto, 1fr),
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/3. Tests.typ"
#include "Chapters/4. Summary.typ"
#pagebreak(to: "odd")
#render-bib()
#pagebreak()
#list-of-figures()
+18 -33
View File
@@ -79,7 +79,7 @@
margin: (
top: 3.2cm,
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,
),
@@ -88,11 +88,22 @@
let pg = counter(page).get().first()
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 is-chapter-page = chapter-locs.any(h => counter(page).at(h.location()).first() == pg)
if chapter-locs.len() == 0 {} else if not is-chapter-page {
// Detect blank pages inserted by pagebreak(to: "odd").
// The marker is placed before the pagebreak, so it lands on the last page
// of the previous chapter (pg - 1 relative to the blank even page).
let chapter-break-markers = query(<chapter-break-marker>)
let is-blank-page = (
not is-odd
and chapter-break-markers.any(
m => counter(page).at(m.location()).first() == pg - 1,
)
)
if chapter-locs.len() == 0 {} else if not is-chapter-page and not is-blank-page {
// Tytuł bieżącego rozdziału do nagłówka
let prev = query(heading.where(level: 1).before(here()))
let ch-label = if prev.len() > 0 {
@@ -174,7 +185,10 @@
if it.level == 1 {
// Wymuszenie nowej strony dla głównego rozdziału
pagebreak(weak: true)
// Marker placed before the break so it appears on the last page of the
// previous chapter; used by the header to detect blank even pages.
[#metadata("chapter-break") <chapter-break-marker>]
pagebreak(to: "odd", weak: true)
v(1.5em, weak: true)
block(width: 100%, inset: (bottom: 1em, top: 7em))[
@@ -207,35 +221,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 ──────────────────────────────────────
show raw.where(block: true): it => {
block(
+9 -3
View File
@@ -6,7 +6,9 @@
#set heading(numbering: "1.1")
#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 => {
let is-lvl-1 = it.level == 1
@@ -27,9 +29,13 @@
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())[
#grid(