Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.10.0

- Add `expose` template for writing an exposé (thesis proposal), mirroring the exposé support of the official HAW LaTeX termpaper template:
- Cover page shows the document kind ("EXPOSÉ" / "PROPOSAL") above the author
- No abstract and no declaration of independent processing
- Optional `keywords` are printed at the beginning of the content
- Fix German dates showing English month names
- Add keywords as document property

## 0.9.0

- Optimize template internals
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To use this package just add the following code to your [Typst](https://github.c
### Report

```typst
#import "@preview/haw-hamburg:0.9.0": report
#import "@preview/haw-hamburg:0.10.0": report

#show: report.with(
language: "en",
Expand All @@ -22,7 +22,7 @@ To use this package just add the following code to your [Typst](https://github.c
### Bachelor Thesis

```typst
#import "@preview/haw-hamburg:0.9.0": bachelor-thesis
#import "@preview/haw-hamburg:0.10.0": bachelor-thesis

#show: bachelor-thesis.with(
language: "en",
Expand All @@ -46,7 +46,7 @@ To use this package just add the following code to your [Typst](https://github.c
### Master Thesis

```typst
#import "@preview/haw-hamburg:0.9.0": master-thesis
#import "@preview/haw-hamburg:0.10.0": master-thesis

#show: master-thesis.with(
language: "en",
Expand All @@ -67,6 +67,22 @@ To use this package just add the following code to your [Typst](https://github.c
)
```

### Exposé

```typst
#import "@preview/haw-hamburg:0.10.0": expose

#show: expose.with(
language: "en",
title: "Example title",
keywords: ("Keyword", "Important", "Super"),
author: "Example author",
faculty: "Computer Science and Digital Society",
supervisors: ("Prof. Dr. Example", "Prof. Dr. Example"),
submission-date: datetime(year: 1948, month: 12, day: 10),
)
```

## How to Compile

This project contains an example setup that splits individual chapters into different files.\
Expand All @@ -90,3 +106,4 @@ Examples can be found inside of the [examples](https://github.com/LasseRosenow/H
- For Bachelor theses see: [Bachelor thesis example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/bachelor-thesis)
- For Master theses see: [Master thesis example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/master-thesis)
- For reports see: [Report example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/report)
- For exposés see: [Expose example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/expose)
8 changes: 8 additions & 0 deletions examples/expose/bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@book{UN,
author = {{United Nations}},
title = {Universal Declaration of Human Rights},
year = {1948},
month = dec,
venue = {Paris},
month_numeric = {12}
}
12 changes: 12 additions & 0 deletions examples/expose/chapters/01_introduction.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
= Introduction and Motivation

Ever since the proclamation of a common standard of achievement for all peoples
and all nations @UN, the question of what it all means has remained open. Many
generations of philosophers, mathematicians and computer scientists have tried
to answer the Ultimate Question of Life, the Universe, and Everything — so far
without a satisfying result.

This thesis will approach the question computationally. A dedicated planetary
computer will be designed and run until an answer is produced. The exposé at
hand motivates the topic, defines the goals of the thesis and describes the
planned approach and schedule.
14 changes: 14 additions & 0 deletions examples/expose/chapters/02_objectives.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
= Problem Statement and Objectives

The problem is twofold: it is unclear what the answer to the Ultimate Question
is, and it is equally unclear what the Ultimate Question actually says. Within
the scope of this thesis only the first part will be addressed.

The objectives of the thesis are:

+ Design of an architecture that is capable of computing the answer.
+ Implementation of a prototype of the proposed architecture.
+ Evaluation of the produced answer with respect to correctness and usefulness.

Out of scope is the reconstruction of the Ultimate Question itself, which is
left for future work.
14 changes: 14 additions & 0 deletions examples/expose/chapters/03_approach.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
= Planned Approach

The thesis will follow an iterative approach. First, related work on very large
questions is reviewed. Based on the findings, a suitable architecture is
designed and a prototype is implemented. The prototype is then evaluated
against a set of smaller, well understood questions before it is applied to the
Ultimate Question.

== Methodology

The evaluation will compare the computed answer against the expectations of a
panel of hyper-intelligent beings. The comparison is carried out in a
controlled experiment, and the results are analyzed both quantitatively and
qualitatively.
18 changes: 18 additions & 0 deletions examples/expose/chapters/04_schedule.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
= Schedule

The thesis is planned to be completed within seven and a half million years.
The table below shows the planned schedule.

#figure(
table(
columns: (auto, 1fr),
align: left,
table.header([*Phase*], [*Task*]),
[Months 1--2], [Literature review and analysis of related work],
[Months 3--4], [Architecture design],
[Months 5--6], [Prototype implementation],
[Month 7], [Evaluation and experiments],
[Month 8 -- Year 7.5M], [Computation of the answer, writing of the thesis],
),
caption: [Planned schedule of the thesis],
)
25 changes: 25 additions & 0 deletions examples/expose/main.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#import "../../lib/lib.typ": expose
#show: expose.with(
language: "en",
title: "Answer to the Ultimate Question of Life, the Universe, and Everything",
keywords: ("Life", "Universe", "Everything"),
author: "The Computer",
faculty: "Computer Science and Digital Society",
supervisors: ("Prof. Dr. Example", "Prof. Dr. Example"),
submission-date: datetime(year: 1948, month: 12, day: 10),
// Everything inside "after-content" will be automatically injected
// into the document after the actual content ends.
after-content: {
// Print bibliography
pagebreak(weak: true)
bibliography("bibliography.bib", style: "../../lib/assets/ieeetran.csl")
},
)

// Include chapters of expose
#include "chapters/01_introduction.typ"
#include "chapters/02_objectives.typ"
#include "chapters/03_approach.typ"
#include "chapters/04_schedule.typ"
23 changes: 20 additions & 3 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To use this package just add the following code to your [Typst](https://github.c
### Report

```typst
#import "@preview/haw-hamburg:0.9.0": report
#import "@preview/haw-hamburg:0.10.0": report

#show: report.with(
language: "en",
Expand All @@ -22,7 +22,7 @@ To use this package just add the following code to your [Typst](https://github.c
### Bachelor Thesis

```typst
#import "@preview/haw-hamburg:0.9.0": bachelor-thesis
#import "@preview/haw-hamburg:0.10.0": bachelor-thesis

#show: bachelor-thesis.with(
language: "en",
Expand All @@ -46,7 +46,7 @@ To use this package just add the following code to your [Typst](https://github.c
### Master Thesis

```typst
#import "@preview/haw-hamburg:0.9.0": master-thesis
#import "@preview/haw-hamburg:0.10.0": master-thesis

#show: master-thesis.with(
language: "en",
Expand All @@ -67,10 +67,27 @@ To use this package just add the following code to your [Typst](https://github.c
)
```

### Exposé

```typst
#import "@preview/haw-hamburg:0.10.0": expose

#show: expose.with(
language: "en",
title: "Example title",
keywords: ("Keyword", "Important", "Super"),
author: "Example author",
faculty: "Computer Science and Digital Society",
supervisors: ("Prof. Dr. Example", "Prof. Dr. Example"),
submission-date: datetime(year: 1948, month: 12, day: 10),
)
```

## Examples

Examples can be found inside of the [examples](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples) directory

- For Bachelor theses see: [Bachelor thesis example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/bachelor-thesis)
- For Master theses see: [Master thesis example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/master-thesis)
- For reports see: [Report example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/report)
- For exposés see: [Expose example](https://github.com/LasseRosenow/HAW-Hamburg-Typst-Template/tree/main/examples/expose)
44 changes: 44 additions & 0 deletions lib/lib.typ
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
is-master-thesis: false,
is-bachelor-thesis: false,
is-report: true,
is-expose: false,

language: language,

Expand All @@ -41,6 +42,47 @@
)
}

#let expose(
language: "en",
title: "",
keywords: none,
author: "",
faculty: "",
supervisors: (),
submission-date: none,
before-content: none,
after-content: none,
body,
) = {
import "template.typ": template
template(
is-thesis: false,
is-master-thesis: false,
is-bachelor-thesis: false,
is-report: false,
is-expose: true,

language: language,

title-de: title,
keywords-de: keywords,
abstract-de: none,

title-en: title,
keywords-en: keywords,
abstract-en: none,

author: author,
faculty: faculty,
study-course: none,
supervisors: supervisors,
submission-date: submission-date,
before-content: before-content,
after-content: after-content,
body,
)
}

#let bachelor-thesis(
language: "en",
title-de: "",
Expand All @@ -64,6 +106,7 @@
is-master-thesis: false,
is-bachelor-thesis: true,
is-report: false,
is-expose: false,

language: language,

Expand Down Expand Up @@ -109,6 +152,7 @@
is-master-thesis: true,
is-bachelor-thesis: false,
is-report: false,
is-expose: false,

language: language,

Expand Down
15 changes: 9 additions & 6 deletions lib/pages/cover.typ
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
is-master-thesis: false,
is-bachelor-thesis: true,
is-report: false,
is-expose: false,
title: "",
author: "",
faculty: "",
Expand Down Expand Up @@ -35,12 +36,15 @@
right: 18mm,
stack(
// Type
if is-thesis {
let thesis-title = translations.bachelor-thesis
if is-thesis or is-expose {
let document-kind = translations.bachelor-thesis
if is-master-thesis {
thesis-title = translations.master-thesis
document-kind = translations.master-thesis
}
upper(text(thesis-title, size: 9pt, weight: "bold"))
if is-expose {
document-kind = translations.expose
}
upper(text(document-kind, size: 9pt, weight: "bold"))
v(2mm)
},
// Author
Expand Down Expand Up @@ -77,7 +81,7 @@
),
)

if (is-report) {
if (is-report or is-expose) {
set text(size: 11pt)
place(
left + top,
Expand Down Expand Up @@ -115,7 +119,6 @@
)
}


if is-thesis {
// Second cover page
pagebreak()
Expand Down
26 changes: 25 additions & 1 deletion lib/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
is-master-thesis: false,
is-bachelor-thesis: true,
is-report: false,
is-expose: false,
// Language
language: "en",
// German
Expand Down Expand Up @@ -31,8 +32,18 @@
title = title-en
}

let keywords = keywords-de
if language == "en" {
keywords = keywords-en
}

// Set the document's basic properties.
set document(author: author, title: title, date: submission-date)
set document(
author: author,
title: title,
date: submission-date,
keywords: if keywords == none { () } else { keywords },
)
set page(
margin: (left: 31.5mm, right: 31.5mm, top: PAGE_MARGIN_TOP, bottom: 56mm),
numbering: "i",
Expand Down Expand Up @@ -152,6 +163,7 @@
is-master-thesis: is-master-thesis,
is-bachelor-thesis: is-bachelor-thesis,
is-report: is-report,
is-expose: is-expose,

title: title,
author: author,
Expand Down Expand Up @@ -212,6 +224,18 @@

set par(justify: true)

// Keywords are expose only, as it has no abstract page
if is-expose and keywords != none {
import "translations.typ": translations
let keywords-text = if type(keywords) == array {
keywords.join(", ")
} else {
keywords
}
text(translations.keywords + ": " + keywords-text, weight: "bold")
v(5mm)
}

body

// Include after-content pages
Expand Down
Loading