From 590f92f97e97259765dac972be3efc29ed84ed39 Mon Sep 17 00:00:00 2001 From: Alexander Nutz Date: Tue, 8 Jul 2025 18:06:33 +0200 Subject: [PATCH] html title --- core-page-style.typ | 4 +++- pages/article-favicon.typ | 3 ++- pages/article-make-regex-engine-1.typ | 3 ++- pages/compiler-pattern-matching.typ | 16 +++++++++------- pages/index.typ | 1 + pages/project-etc-nand.typ | 3 ++- simple-page-layout.typ | 9 ++++++++- 7 files changed, 27 insertions(+), 12 deletions(-) diff --git a/core-page-style.typ b/core-page-style.typ index 1ab4906..a43b5da 100644 --- a/core-page-style.typ +++ b/core-page-style.typ @@ -4,9 +4,11 @@ #let small-font-size = if is-web { 14pt } else { 9pt } #let default-font-size = if is-web { 17pt } else { 10pt } -#let core-page-style(content) = {context html-opt-elem("html", (:))[ +#let core-page-style(html-head: [], content) = {context html-opt-elem("html", (:))[ #context if is-html() { html.elem("head",[ + #html-head + #html.elem("meta", attrs:(charset:"utf-8")) #html.elem("meta", attrs:(name:"viewport", content:"width=device-width, initial-scale=1")) diff --git a/pages/article-favicon.typ b/pages/article-favicon.typ index 98119bf..3cd7d55 100644 --- a/pages/article-favicon.typ +++ b/pages/article-favicon.typ @@ -3,7 +3,8 @@ #import "../core-page-style.typ": * #simple-page( - gen-table-of-contents: true + gen-table-of-contents: true, + [The making of the favicon] )[ #section[ diff --git a/pages/article-make-regex-engine-1.typ b/pages/article-make-regex-engine-1.typ index 9f5f138..3e3aba7 100644 --- a/pages/article-make-regex-engine-1.typ +++ b/pages/article-make-regex-engine-1.typ @@ -3,7 +3,8 @@ #import "../core-page-style.typ": * #simple-page( - gen-table-of-contents: true + gen-table-of-contents: true, + [Introduction to RegEx] )[ #section[ diff --git a/pages/compiler-pattern-matching.typ b/pages/compiler-pattern-matching.typ index 32b9d20..56ebc04 100644 --- a/pages/compiler-pattern-matching.typ +++ b/pages/compiler-pattern-matching.typ @@ -3,7 +3,8 @@ #import "../core-page-style.typ": * #simple-page( - gen-table-of-contents: true + gen-table-of-contents: true, + [Alexander Nutz - Approaches to Pattern Matching] )[ #section[ @@ -324,11 +325,12 @@ \ As a simple, *non realistic* example, let's imagine a CPU (core) that has one bit operations execution unit, and two ALU execution units: - #context html-frame[``` - +---------+-----+-----+ - | Bit Ops | ALU | ALU | - +---------+-----+-----+ - ```] + #context html-frame(table( + columns: 3, + inset: 7pt, + [ Bit Ops ], + [ ALU ], [ ALU ], + )) This means that the CPU can execute two instructions in the ALU unit and one instruction in the bit ops unit at the same time. ] @@ -351,7 +353,7 @@ #section[ = Conclusion - One can see how pattern matching dialects are the best option by far. + One can see how pattern matching dialects are the best option to approach pattern matching. \ Someone wanted me to insert a takeaway here, but I won't. diff --git a/pages/index.typ b/pages/index.typ index beb1ec5..2f3bf73 100644 --- a/pages/index.typ +++ b/pages/index.typ @@ -17,6 +17,7 @@ gen-table-of-contents: false, gen-index-ref: false, min-pdf-link: false, + [Alexander Nutz] )[ #br() diff --git a/pages/project-etc-nand.typ b/pages/project-etc-nand.typ index 262a094..5432390 100644 --- a/pages/project-etc-nand.typ +++ b/pages/project-etc-nand.typ @@ -9,7 +9,8 @@ } #simple-page( - gen-table-of-contents: true + gen-table-of-contents: true, + [etc-nand] )[ diff --git a/simple-page-layout.typ b/simple-page-layout.typ index 0855d6a..45b2e29 100644 --- a/simple-page-layout.typ +++ b/simple-page-layout.typ @@ -17,9 +17,16 @@ gen-table-of-contents: true, gen-index-ref: true, min-pdf-link: true, + html-title, content) = { - core-page-style[ + let head = context if is-html() { + [ + #html.elem("title", html-title) + ] + } else {[]} + + core-page-style(html-head: head)[ #if is-web { let off = 3;