From 41bcf480e2b263ae20259fb174f6a24520c85887 Mon Sep 17 00:00:00 2001 From: Sven Vogel Date: Thu, 4 Jul 2024 15:09:05 +0200 Subject: [PATCH] added: preface --- src/conf.typ | 1 + src/lib.typ | 2 ++ src/pages/preface.typ | 7 +++++++ template/main.typ | 1 + template/preface.typ | 4 ++++ 5 files changed, 15 insertions(+) create mode 100644 src/pages/preface.typ create mode 100644 template/preface.typ diff --git a/src/conf.typ b/src/conf.typ index 089a586..455706f 100644 --- a/src/conf.typ +++ b/src/conf.typ @@ -30,6 +30,7 @@ kind: "T2000", summary: none, abstract: none, + preface: none, keywords: ( "IT", "other stuff" ), bibliography: none /* bibliography("refs.bib") */, glossary: none, diff --git a/src/lib.typ b/src/lib.typ index af2057b..87b5fcf 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -18,6 +18,7 @@ #import "pages/prerelease-note.typ": new_prerelease_note #import "pages/outline.typ": new_outline #import "pages/abstract.typ": new_abstract + #import "pages/preface.typ": new-preface #import "pages/appendix.typ": show-appendix #let config = validate-config(config) @@ -49,6 +50,7 @@ new_prerelease_note(config) } #new_abstract(config) + #new-preface(config) #new_outline() // glossary is built inline here because the links must be diff --git a/src/pages/preface.typ b/src/pages/preface.typ new file mode 100644 index 0000000..1575073 --- /dev/null +++ b/src/pages/preface.typ @@ -0,0 +1,7 @@ + +#let new-preface(config) = { + if config.thesis.preface != none { + pagebreak(weak: true) + config.thesis.preface + } +} \ No newline at end of file diff --git a/template/main.typ b/template/main.typ index 400d24c..cd09420 100644 --- a/template/main.typ +++ b/template/main.typ @@ -25,6 +25,7 @@ kind: "T2000", summary: summary, abstract: abstract, + preface: include "preface.typ", keywords: ( "IT", "other stuff" ), bibliography: bibliography("refs.bib"), glossary: glossary, diff --git a/template/preface.typ b/template/preface.typ new file mode 100644 index 0000000..efba246 --- /dev/null +++ b/template/preface.typ @@ -0,0 +1,4 @@ + += Vorwort + +#lorem(50)