From e9756f7bdda8a7b17071aeb90498587f22662a30 Mon Sep 17 00:00:00 2001 From: Popa <115492561+Popa-42@users.noreply.github.com> Date: Sat, 31 Oct 2026 18:19:51 +0100 Subject: [PATCH] fix: refine heading styling and export grad --- 0.1.0/helpers.typ | 3 +++ 0.1.0/lib.typ | 2 +- 0.1.0/style.typ | 39 +++++++++++++++++++++++---------------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/0.1.0/helpers.typ b/0.1.0/helpers.typ index 98be834..e09c830 100644 --- a/0.1.0/helpers.typ +++ b/0.1.0/helpers.typ @@ -23,4 +23,7 @@ #let Im = math.op("Im") #let Re = math.op("Re") #let ü = text(font: "Fira Sans", size: 0.85em, weight: 600)[[Ü]] + #let ord = math.op("ord") + +#let grad = math.op("grad") diff --git a/0.1.0/lib.typ b/0.1.0/lib.typ index f98c506..dfbe581 100644 --- a/0.1.0/lib.typ +++ b/0.1.0/lib.typ @@ -3,4 +3,4 @@ #import "title-page.typ": title-page #import "lecture.typ": lecture, lecture-counter, reset-lectures #import "boxes.typ": * -#import "helpers.typ": Im, Re, ord, qed, qed-equation, render-footnote-entry, ü +#import "helpers.typ": grad, Im, Re, ord, qed, qed-equation, render-footnote-entry, ü diff --git a/0.1.0/style.typ b/0.1.0/style.typ index db15457..c7ba5cd 100644 --- a/0.1.0/style.typ +++ b/0.1.0/style.typ @@ -23,20 +23,23 @@ set text(size: 0.8em, font: active-theme.text.sans-font) let headings = query(selector(heading.where(level: 1)).before(here())) - grid( - columns: (1fr, 2fr, 1fr), - align: (start, center, end), - if seminar == none { [] } else { seminar }, - if headings.len() > 1 { - let last = headings.last() - show linebreak: none - [*#last.body*] - }, - if lectures.len() > 0 { - let current = lectures.last().value - text(fill: active-theme.colors.text)[#current.prefix #current.number, #current.date] - }, - ) + if headings.len() > 1 { + let last = headings.last() + + grid( + columns: (1fr, 2fr, 1fr), + align: (start, center, end), + if seminar == none { [] } else { seminar }, + { + show linebreak: none + [*#last.body*] + }, + if lectures.len() > 0 { + let current = lectures.last().value + text(fill: active-theme.colors.text)[#current.prefix #current.number, #current.date] + }, + ) + } } }, ) @@ -47,10 +50,15 @@ ) show math.equation: set text(font: active-theme.text.math-font) + show heading: it => context { + set text(font: theme-state.get().text.sans-font) + show math.equation: set text(font: "Fira Math") + it + } + show heading.where(level: 1): it => context { set text( size: 1.25em, - font: theme-state.get().text.sans-font, weight: 700, fill: theme-state.get().colors.text, ) @@ -70,7 +78,6 @@ show heading.where(level: 2): it => context { set text( size: 1.15em, - font: theme-state.get().text.sans-font, weight: 700, fill: theme-state.get().colors.text, )