From 1bd2d08677e4035e9298e962f2b2e15b6892062c Mon Sep 17 00:00:00 2001 From: Oschly Date: Sun, 7 Jun 2026 17:19:49 +0200 Subject: [PATCH] styling fixes - include bib in contents - fix page breaks between chapters - fix colors in table of contents --- Thesis/Bibliography.typ | 4 ++-- Thesis/main.pdf | 4 ++-- Thesis/main.typ | 1 - Thesis/style.typ | 35 +++-------------------------------- Thesis/table_of_contents.typ | 12 +++++++++--- 5 files changed, 16 insertions(+), 40 deletions(-) diff --git a/Thesis/Bibliography.typ b/Thesis/Bibliography.typ index d2cfe72..01f1b57 100644 --- a/Thesis/Bibliography.typ +++ b/Thesis/Bibliography.typ @@ -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, diff --git a/Thesis/main.pdf b/Thesis/main.pdf index 118065b..a9f3fc0 100644 --- a/Thesis/main.pdf +++ b/Thesis/main.pdf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19277a902fc3a322a9589f7feb05897486a0b5d4e6f34726343bbc2718bf3217 -size 1630355 +oid sha256:9b98db1243fe062aaf8d65fa478222668d677f2edbd2f606896090e0d71efacc +size 1639976 diff --git a/Thesis/main.typ b/Thesis/main.typ index 93bc1e6..202b2c2 100644 --- a/Thesis/main.typ +++ b/Thesis/main.typ @@ -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() diff --git a/Thesis/style.typ b/Thesis/style.typ index 9b1fd0e..2aed6ed 100644 --- a/Thesis/style.typ +++ b/Thesis/style.typ @@ -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,7 +88,7 @@ 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) @@ -174,7 +174,7 @@ if it.level == 1 { // Wymuszenie nowej strony dla głównego rozdziału - pagebreak(weak: true) + pagebreak(to: "odd", weak: true) v(1.5em, weak: true) 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 ────────────────────────────────────── show raw.where(block: true): it => { block( diff --git a/Thesis/table_of_contents.typ b/Thesis/table_of_contents.typ index 6537451..e239bed 100644 --- a/Thesis/table_of_contents.typ +++ b/Thesis/table_of_contents.typ @@ -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(