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
21 changes: 21 additions & 0 deletions modern-se-kul-thesis/0.1.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Benjamin Eeckhout

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
69 changes: 69 additions & 0 deletions modern-se-kul-thesis/0.1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# The `modern-se-kul-thesis` Package
<div align="center">Version 0.1.0</div>

This is an unofficial typst template for doing a thesis at the engineering science faculty at KU Leuven.
This was made by trying to as closely follow the Latex template [here](https://eng.kuleuven.be/docs/kulemt).
## Usage

You can use this template in the web editor by going to "start from template" and searching for "modern-se-kul-thesis".
Alternatively, you can use this template locally by running:
```typ
typst init @preview/modern-se-kul-thesis
```
This will then create a basic folder structure with some fields pre-filled.

## Configuration
- `title`: The title of the thesis.
- `subtitle`: An optional subtitle.
- `academic-year`: Can be a starting year (e.g. 2025) or a tuple of start and end year (e.g. 2025,2027)
- `authors`: An array of all the authors.
- `promotors`: An array of all the promotors.
- `assessors`: An array of all the assessors.
- `supervisors`: An array of all the supervisors.
- `degree: An array containing`: the name of your master, elective and the specified color in hsv (default is for computer science).
- `language`: "en" or "nl".
- `electronic-version`: A boolean toggle to set the thesis as electronic.
- `english-master`: A boolean toggle to use the template for the English master.
- `list-of-figures`: Toggle to add a list of figures.
- `list-of-listings`: Toggle to add a list of listings (code blocks).
- `font-size`: Font size toggle.
- `preface`: The preface of your thesis goes here.
- `abstract`: The abstract of your thesis goes here.
- `dutch-summary`: The dutch summary of your thesis goes here.
- `abbreviations`: The abbreviations used in your thesis go here.
- `symbols`: The symbols used in your thesis go here.
- `bibliography`: The bibliography of your thesis goes here.
- `appendices`: The appendices of your thesis goes here.
- `logo`: The logo of the university for the front page
```typ
#import "@preview/modern-se-kul-thesis:0.1.0": template
#show: template.with(
title: [The main title],
subtitle: [The subtitle],
academic-year: 2025,
authors: ("an Author",),
promotors: ("a promotor",),
assessors: ("an assessor",),
supervisors: ("a supervisor",),
degree: (
elective: "Software engineering",
master: "Computer Science",
color: (0, 0, 1, 0),
),
language: "en",
electronic-version: false,
english-master: false,
list-of-figures: true,
list-of-listings: false,
font-size: 11pt,
preface: [#lorem(100)],
abstract: [#lorem(100)],
dutch-summary: [#lorem(100)],
abbreviations: [WIP: Work in progress],
symbols: [$Omega$:Ohm],
bibliography: include bibliography.bib,
appendices: [#lorem(100)],
logo: [Temp]
)
// Put your thesis content here
```
21 changes: 21 additions & 0 deletions modern-se-kul-thesis/0.1.0/src/assets/text-blobs.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#let submission-text(degree, elective) = (
"en": [
Thesis submitte as part of the degree Master of Science: #degree, with elective #elective
],
"nl" : [
Thesis voorgedragen tot het behalen van de graad van Master of Science in de ingenieurswetenschappen: #degree, hoofdoptie #elective
]
)

#let copyright = (
"tm": [#sym.copyright Copyright KU Leuven],
"en" :[
Without written permission of the supervisors and the author it is forbidden to reproduce or adapt in any form or by any means any part of this publication. Requests for obtaining the right to reproduce or utilize parts of this publication should be addressed to the Departement Computerwetenschappen, Celestijnenlaan 200A bus 2402, B-3001 Heverlee, +32-16-327700 or by email #link("mailto:[email protected]").
#v(1em)
A written permission of the supervisors is also required to use the methods, products, schematics and programmes described in this work for industrial or commercial use, and for submitting this publication in scientific contests.],

"nl": [Zonder voorafgaande schriftelijke toestemming van zowel de promotoren als de auteur is overnemen, kopiëren, gebruiken of realiseren van deze uitgave of gedeelten ervan verboden. Voor aanvragen tot of informatie i.v.m. het overnemen en/of gebruik en/of realisatie van gedeelten uit deze publicatie, wend u tot het Departement Computerwetenschappen, Celestijnenlaan 200A bus 2402, B-3001 Heverlee, +32-16- 327700 of via e-mail #link("mailto:[email protected]").

#v(1em)

Voorafgaande schriftelijke toestemming van de promotoren is eveneens vereist voor het aanwenden van de in deze masterproef beschreven (originele) methoden, producten, schakelingen en programma's voor industrieel of commercieel nut en voor de inzending van deze publicatie ter deelname aan wetenschappelijke prijzen of wedstrijden.])
14 changes: 14 additions & 0 deletions modern-se-kul-thesis/0.1.0/src/core/component.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#import "components/abstract.typ": insert-abstract
#import "components/bibliography.typ": insert-bibliography
#import "components/copyright.typ": insert-copyright
#import "components/cover-page.typ": insert-cover-page
#import "components/declaration-of-originality.typ": insert-dec-of-orig
// #import "components/keywords.typ": insert-keywords
#import "components/preface.typ": insert-preface
#import "components/outline.typ": (
insert-heading-outline, insert-image-outline, insert-listing-outline,
)
#import "components/list-of-abbrvs-symbols.typ": insert-list-of-abbrv-symbol
// #import "components/figure-outline.typ": insert-figure-outline
#import "components/appendix.typ": insert-appendices

25 changes: 25 additions & 0 deletions modern-se-kul-thesis/0.1.0/src/core/components/abstract.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#let insert-abstract(abstract, lang: "en") = context {
heading(
level: 1,
numbering: none,
outlined: true,
if lang == "en" {
"Abstract"
} else {
"Samenvatting"
},
)
if abstract != none {
abstract
} else {
let t = if lang == "nl" {
"PLAATSHOUDER VOOR SAMENVATTING"
} else {
"PLACEHOLDER FOR ABSTRACT"
}
text(purple, size: 3em)[#t]
set text(red)
lorem(200)
}
}

40 changes: 40 additions & 0 deletions modern-se-kul-thesis/0.1.0/src/core/components/appendix.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#let insert-appendices(appendices) = {
set heading(numbering: "A.1", supplement: "Appendix")
// let heading-number = "1.1.1."
// let heading-spacing = context h(
// measure(heading-number).width - measure(heading-number).width,
// )
pagebreak(weak: true, to: "odd")
page(
footer: context [#align(center)[#(
(here().page-numbering())(here().page())
)]],
header: none,
)[
#set align(center)
#v(40%)
#text(size: 2.5em, weight: "semibold")[Appendices]
]

pagebreak(weak: true, to: "odd")

// shoddy hack, but it works
// show heading: it => {
// if it.level == 1 { it } else {
// let size = if it.level == 2 {
// 1.1em
// } else { 1em }
// set text(size, weight: "bold")
// let first-number = numbering(it.numbering, counter(heading).get().first())
//
// let heading-number = (first-number, ..counter(heading).get().slice(1))
// .map(str)
// .join(".")
// [#linebreak()#heading-number #heading-spacing #it.body#linebreak()]
// }
// }
set heading(numbering: "A.1")
counter(heading).update(0)
appendices
}

27 changes: 27 additions & 0 deletions modern-se-kul-thesis/0.1.0/src/core/components/bibliography.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

// Bibliography
#let insert-bibliography(bib, lang: "en") = {
if bib != none {
show heading: it => {
pagebreak(to: "odd", weak: true)
pad(top: 1em + 35mm, bottom: 2em, text(
size: 1.7em,
)[#it.body])
}
heading(
level: 1,
numbering: none,
if lang == "en" {
"Bibliography"
} else {
"Bibliografie"
},
outlined: true,
)
set bibliography(title: none)
set par(spacing: 1em)
show bibliography: set text(size: 0.9em)
show link: it => text(fill: rgb(238, 34, 153), weight: "semibold")[#it]
bib
}
}
31 changes: 31 additions & 0 deletions modern-se-kul-thesis/0.1.0/src/core/components/copyright.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#import "../../assets/text-blobs.typ": copyright
/// inserts the copyright page
/// -> content
#let insert-copyright(
/// Whether the thesis is done during an English master
/// -> bool
english-master,
/// The language of the thesis
/// -> Str
lang,
) = {
// Copyright
set align(left + bottom)
set par(justify: true, first-line-indent: 0pt)
show link: it => [#text(font: "Nimbus Mono PS", weight: 300)[#it]]
set text(hyphenate: false)
copyright.tm + v(2em)
if lang == "en" {
copyright.en + v(2em)
}
if not english-master {
copyright.nl
}

// par(first-line-indent: 0pt, leading: 5pt, justify: true)[
// text(hyphenate: false, size: 10.5pt)[
// #copyright-text
// ]
// ]
v(7%)
}
Loading