diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/LICENSE b/packages/preview/dmi-basilea-thesis/0.1.2/LICENSE new file mode 100644 index 0000000000..f469335c99 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [2025] [Nico Bachmann] + +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. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/README.md b/packages/preview/dmi-basilea-thesis/0.1.2/README.md new file mode 100644 index 0000000000..f4d50cb2b3 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/README.md @@ -0,0 +1,171 @@ +# DMI Basel Thesis Template for Typst + +A modern thesis template for the University of Basel, Department of Mathematics +and Computer Science, built with [Typst](https://typst.app). + +## Features + +- **Fast compilation**: Near-instant preview updates +- **Clean design**: Based on the official LaTeX template +- **Multi-language**: Supports English and German +- **Draft mode**: Built-in TODO markers and draft indicators +- **Rich formatting**: Custom environments for definitions, theorems, algorithms +- **Flexible typography**: Full control over fonts, sizes, and weights + +## Quick Start + +### Using the Typst Package + +```typst +#import "@preview/dmi-basilea-thesis:0.1.2": * + +#show: thesis.with( + title: "Your Thesis Title", + author: "Your Name", + supervisor: "Prof. Dr. Supervisor", + examiner: "Prof. Dr. Examiner", + thesis-type: "Bachelor Thesis", // or "Master Thesis" + + abstract: [ + Your abstract here... + ], + + chapters: ( + include "introduction.typ", + include "methodology.typ", + include "conclusion.typ", + ), + + bibliography-content: bibliography("references.bib"), +) +``` + +### Local Development + +1. Clone this repository +2. Import from the local path: + ```typst + #import "src/main.typ": * + ``` + +## Configuration Options + +### Basic Settings + +- `title`: Your thesis title +- `author`: Your name +- `email`: Your email address +- `supervisor`: Name of your supervisor +- `examiner`: Name of your examiner +- `thesis-type`: "Bachelor Thesis" or "Master Thesis" +- `language`: "en" or "de" +- `date`: Defaults to today + +### Optional Typography Control + +#### Font Families + +- `body-font`: Main text font (default: "Times New Roman") +- `sans-font`: Headings font (default: "Arial") +- `mono-font`: Code font (default: "Courier New") + +#### Font Sizes + +- `body-size`: Main text size (default: 10pt) +- `mono-size`: Code text size (default: 10pt) +- `footnote-size`: Footnote size (default: 9pt) +- `header-size`: Page header size (default: 9pt) + +#### Heading Sizes + +- `chapter-number-size`: Chapter number size (default: 100pt) +- `chapter-title-size`: Chapter title size (default: 24pt) + +#### Font Weights + +- `chapter-number-weight`: Weight for chapter numbers (default: "bold") +- `chapter-title-weight`: Weight for chapter titles (default: "bold") + +#### Sections + +- `sections`: This is an array where each object defines the styling for a + specific subsection level. The array index corresponds to the subsection level + (e.g., index 0 for level 1, index 1 for level 2, and so on). Each object + within the array contains the following properties: + - `size`: The font size of the section + - `weight`: The font weight + - `space-before`: The spacing before the section start + - `space-after`: The spacing after the section title + - `style`: A custom styling function for the section +- `default-section`: This is a single dictionary that defines the default + styling for any heading level not explicitly included in the sections array. + It contains the same properties as the dictionaries within the sections array. + +### Advanced Styling + +For complete control, you can provide custom styling functions: + +```typst +#show: thesis.with( + // Rainbow gradient chapter titles + chapter-title-style: (content) => text( + size: 30pt, + fill: gradient.linear(..color.map.rainbow), + content + ), + + // Custom body text + body-text-style: (body) => { + set text(font: "Minion Pro", size: 11pt) + body + }, +) +``` + +Available style functions: + +- `body-text-style`: Override body text styling +- `mono-text-style`: Override code text styling +- `chapter-number-style`: Override chapter number styling +- `chapter-title-style`: Override chapter title styling + +### Compilation Modes + +- `draft`: Show/hide TODO markers (default: true) +- `colored`: Enable/disable colors for definitions and theorems (default: false) + +## Template Features + +### TODO Markers (Draft Mode) + +```typst +#todo[General TODO] +#todo-missing[Missing content] +#todo-check[Needs verification] +#todo-revise[Needs revision] +#todo-citation[Add citation] +#todo-language[Check language] +#todo-question[Open question] +#todo-note[Note to self] +``` + +### Custom Environments + +```typst +#definition(title: "Definition")[ + Your definition here... +] + +#theorem(title: "Theorem")[ + Your theorem here... +] + +#algorithm(caption: "My Algorithm")[ + Your algorithm here... +] +``` + +## Contributing + +Contributions are welcome! Please open an issue or submit a pull request on +[GitHub](https://github.com/Nifalu/dmi-basilea-thesis). diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/docs/manual.pdf b/packages/preview/dmi-basilea-thesis/0.1.2/docs/manual.pdf new file mode 100644 index 0000000000..24856d0a09 Binary files /dev/null and b/packages/preview/dmi-basilea-thesis/0.1.2/docs/manual.pdf differ diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-de.pdf b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-de.pdf new file mode 100644 index 0000000000..348ad7b3bf Binary files /dev/null and b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-de.pdf differ diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-de.svg b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-de.svg new file mode 100644 index 0000000000..b51d3f5581 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-de.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-en.pdf b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-en.pdf new file mode 100644 index 0000000000..8b5efb97c4 Binary files /dev/null and b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-en.pdf differ diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-en.svg b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-en.svg new file mode 100644 index 0000000000..d652d2348e --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/logo-en.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/thumbnail.png b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/thumbnail.png new file mode 100644 index 0000000000..af111bf221 Binary files /dev/null and b/packages/preview/dmi-basilea-thesis/0.1.2/src/assets/thumbnail.png differ diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/lib.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/lib.typ new file mode 100644 index 0000000000..a71a58a465 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/lib.typ @@ -0,0 +1,113 @@ +// Utility functions provided by this template. + +#let thesis-draft-state = state("thesis-draft", true) +#let thesis-color-state = state("thesis-color", true) + + +#let default-fonts = ( + body: "Times New Roman", + sans: "Arial", + mono: "Courier New" +) + + +// === TODO FUNCTIONS === +#let todo(content, color: red) = { + rect( + fill: color.lighten(80%), + stroke: color, + radius: 3pt, + inset: 5pt, + width: 100%, + )[*TODO:* #content] +} + +#let todo-missing(content) = todo(content, color: rgb(204, 0, 204)) +#let todo-check(content) = todo(content, color: rgb(204, 0, 0)) +#let todo-revise(content) = todo(content, color: rgb(204, 102, 0)) +#let todo-citation(content) = todo(content, color: rgb(204, 204, 0)) +#let todo-language(content) = todo(content, color: rgb(102, 102, 204)) +#let todo-question(content) = todo(content, color: rgb(0, 204, 0)) +#let todo-note(content) = todo(content, color: rgb(51, 51, 51)) + +// === LAYOUT HELPERS === +#let unnumbered-chapter(body) = { + heading(level: 1, numbering: none, outlined: false, body) +} + +// === CUSTOM FIGURE TYPES === +#let algorithm(content, caption: none) = { + figure( + align(left)[ + #rect( + width: 100%, + stroke: 0.5pt + gray, + inset: 10pt, + content + ) + ], + caption: caption, + supplement: "Algorithm", + ) +} + +// === HIGHLIGHTING === +#let important(content) = context { + if thesis-color-state.get() { + highlight(fill: yellow.lighten(60%), content) + } else { + emph(content) // italic in non-colored mode + } +} + +// === CUSTOM BOXES === +#let definition(title: "Definition", content) = context { + if thesis-color-state.get() { + rect( + width: 100%, + stroke: blue, + radius: 3pt, + inset: 10pt, + )[ + #text(weight: "bold", fill: blue)[#title.] #content + ] + } else { + rect( + width: 100%, + stroke: 0.5pt + gray, + radius: 0pt, + inset: 10pt, + )[ + #text(weight: "bold")[#title.] #content + ] + } +} + +#let theorem(title: "Theorem", content) = context { + if thesis-color-state.get() { + rect( + width: 100%, + stroke: green.darken(20%), + radius: 3pt, + inset: 10pt, + )[ + #text(weight: "bold", fill: green.darken(20%))[#title.] #content + ] + } else { + rect( + width: 100%, + stroke: 0.5pt + gray, + radius: 0pt, + inset: 10pt, + )[ + #text(weight: "bold")[#title.] #content + ] + } +} + +// === ABBREVIATIONS === +// Common abbreviations used throughout the thesis +#let ie = [_i.e._] +#let eg = [_e.g._] +#let cf = [_cf._] +#let etal = [_et al._] diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/main.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/main.typ new file mode 100644 index 0000000000..f09002f761 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/main.typ @@ -0,0 +1,408 @@ +#import "lib.typ": * + +/* +Re-export functionality to be accessible via the public API +*/ +#let todo = todo +#let todo-missing = todo-missing +#let todo-check = todo-check +#let todo-revise = todo-revise +#let todo-citation = todo-citation +#let todo-language = todo-language +#let todo-question = todo-question +#let todo-note = todo-note + +#let unnumbered-chapter = unnumbered-chapter +#let algorithm = algorithm +#let important = important +#let definition = definition +#let theorem = theorem +#let default-sections = ( + (size: 14pt, weight: "bold", space_before: 35pt, space_after: 20pt, style: none), // section + (size: 12pt, weight: "bold", space_before: 25pt, space_after: 16pt, style: none), // subsection + (size: 12pt, weight: "bold", space_before: 20pt, space_after: 16pt, style: none) // subsubsection +) + +#let ie = ie +#let eg = eg +#let cf = cf +#let etal = etal + +/* +This is the main function to setup a thesis +*/ +#let thesis( + // Metadata + title: "Thesis Title", + author: "Author Name", + email: "", + immatriculation: "", + supervisor: "", + examiner: "", + department: "Department of Mathematics and Computer Science", + faculty: "Faculty of Science, University of Basel", + research-group: "", + website: "", + thesis-type: "Bachelor Thesis", + date: datetime.today(), + language: "en", + + // Pass your own fonts + body-font: default-fonts.body, + sans-font: default-fonts.sans, + mono-font: default-fonts.mono, + + // Font sizes - individual parameters + body-size: 11pt, + mono-size: 11pt, + footnote-size: 9pt, + header-size: 9pt, + + // Heading sizes - individual parameters + chapter-number-size: 100pt, + chapter-title-size: 24pt, + + sections: default-sections, // make default a variable, such that individual entries of array can be modified + default-section: (size: 12pt, weight: "bold", space_before: 20pt, space_after: 16pt, style: none), + + // Font weights - new parameters + chapter-number-weight: "bold", + chapter-title-weight: "bold", + + // Custom text styling functions - optional overrides + // These allow complete control over text styling if provided + body-text-style: none, // Custom function for body text + mono-text-style: none, // Custom function for mono/code text + chapter-number-style: none, // Custom function for chapter numbers + chapter-title-style: none, // Custom function for chapter titles + + logo: auto, // options: auto | none | path | image-element + logo-width: 4.5cm, + + // compile mode + draft: true, // displays todos + colored: false, // Use colors for definitions, theorems, etc. + + // Content + abstract: [], + acknowledgments: none, + chapters: (), + appendices: (), + bibliography-content: none, + body, +) = { + + // Set the configuration states (add this at the beginning) + thesis-draft-state.update(draft) + thesis-color-state.update(colored) + set document(title: title, author: author) + + // Page setup - matches LaTeX template exactly + set page( + paper: "a4", + margin: 3.5cm, + header: context { + if counter(page).get().first() > 1 { + // Check if we're on a chapter page (level 1 heading) + let on-chapter-page = query(heading.where(level: 1)).any(h => + h.location().page() == here().page() + ) + + // Only show header if not on a chapter page + if not on-chapter-page { + set text(size: header-size, font: body-font, fill: gray) + + // Get current chapter name + let headings = query(heading.where(level: 1).before(here())) + let chapter-name = if headings.len() > 0 { + headings.last().body + } else { + [] + } + + grid( + columns: (1fr, auto), + align: (left, right), + chapter-name, + counter(page).display() + ) + + v(-0.65em) + line(length: 100%, stroke: 0.2pt + gray) + } + } + }, + footer: [] // Empty footer as in LaTeX + ) + + // Typography - apply default settings first + set text( + font: body-font, + size: body-size, + lang: language + ) + + show raw: set text( + font: mono-font, + size: mono-size, + lang: language + ) + + // Apply custom styling if provided (this will override the defaults) + if body-text-style != none { + show: body-text-style + } + + if mono-text-style != none { + show raw: mono-text-style + } + + // Paragraph settings - matching LaTeX + set par( + justify: true, + leading: 0.65em * 1.5, // 1.5 line spacing + first-line-indent: 0pt, // No indent as in LaTeX + ) + + // Footnote settings + set footnote.entry( + separator: line(length: 30%, stroke: 0.5pt), + gap: 0.65em, + ) + + show footnote.entry: it => { + set text(size: footnote-size) + it + } + + set heading(numbering: (..nums) => { + let level = nums.pos().len() + if level == 1 { + // Chapter: no dot + numbering("1", ..nums) + } else { + // Sections and subsections: with dots + numbering("1.", ..nums) + } + }) + + // Equation numbering + set math.equation(numbering: "1.") + + show heading: it => { + // Chapter style - large gray number as in LaTeX + if it.level == 1 { + pagebreak(weak: true) + v(50pt) + + align(right)[ + #grid( + columns: 1, + rows: (auto, auto), + row-gutter: 20pt, + align: right, + + // Chapter number + if it.numbering != none [ + #if chapter-number-style != none { + chapter-number-style(counter(heading).display()) + } else { + text( + size: chapter-number-size, + font: sans-font, + weight: chapter-number-weight, + fill: rgb(179, 179, 179), + counter(heading).display() + ) + } + ], + + // Chapter title + if chapter-title-style != none { + chapter-title-style(it.body) + } else { + text( + size: chapter-title-size, + font: sans-font, + weight: chapter-title-weight, + it.body + ) + } + ) + ] + v(30pt) + } else { + // Section style + let index = it.level - 2 + let section + if sections.len() >= index { + section = default-section + } else { + section = sections.at(index) + } + + v(section.space_before, weak:true) + block(breakable: false)[ + #if section.style != none { + section.style(counter(heading).display() + " " + it.body) + } else { + text(size: section.size, font: sans-font, weight: section.weight)[ + #counter(heading).display() #it.body + ] + } + ] + v(section.space_after, weak: true) // Space after section - matching paragraph spacing + + } + } + + // Title page - matching LaTeX layout + align(center)[ + // Automatically select logo based on language + #if logo != none [ + #let logo-to-use = if logo == auto { + // Auto-select based on language + if language == "en" { + image("assets/logo-en.svg", width: logo-width) + } else { + image("assets/logo-de.svg", width: logo-width) + } + } else { + // User provided logo + if type(logo) == "string" { + image(logo, width: logo-width) + } else { + // Assume it's already an image element + logo + } + } + #place(top + left, logo-to-use) + ] + + #if draft [ + #place(top + right, + rect( + fill: red.lighten(90%), + stroke: red, + inset: 10pt, + )[ + #text(size: 11pt, fill: red, weight: "bold")[DRAFT VERSION] \ + #text(size: 9pt, fill: red)[ + #datetime.today().display("[day].[month].[year]") + ] + ] + ) + ] + + #v(4cm) + + #text(size: 24pt, font: sans-font, weight: "bold")[#title] + + #v(0.5cm) + #text(size: 11pt)[#thesis-type] + + #v(3cm) + + #text(size: 11pt)[ + #faculty \ + #department \ + #if research-group != "" [ + #research-group \ + ] + #if website != "" [ + #website \ + ] + ] + + #v(1.5cm) + + #text(size: 11pt)[ + #if language == "en" [Examiner] else [Beurteiler]: #examiner \ + #if language == "en" [Supervisor] else [Zweitbeurteiler]: #supervisor + ] + + #v(1.5cm) + + #text(size: 11pt)[ + #author \ + #email \ + #if immatriculation != "" [ + #immatriculation + ] + ] + + #v(1fr) + + #text(size: 11pt)[ + #date.display( + if language == "en" { "[month repr:long] [day], [year]" } + else { "[day]. [month repr:long] [year]" } + ) + ] + ] + + // Abstract + if abstract != [] { + pagebreak() + unnumbered-chapter[ + #if language == "en" [Abstract] else [Zusammenfassung] + ] + abstract + } + + // Acknowledgments + if acknowledgments != none { + pagebreak() + unnumbered-chapter[ + #if language == "en" [Acknowledgments] else [Danksagung] + ] + acknowledgments + } + + // Table of contents + pagebreak() + unnumbered-chapter[ + #if language == "en" [Table of Contents] else [Inhaltsverzeichnis] + ] + + outline(indent: auto, title: none) + + // Main content chapters + pagebreak() + for chapter-content in chapters { + chapter-content + } + + // Additional body content + body + + // Bibliography + if bibliography-content != none { + pagebreak() + unnumbered-chapter[ + #if language == "en" [Bibliography] else [Literaturverzeichnis] + ] + bibliography-content + } + + // Appendices + if appendices.len() > 0 { + pagebreak() + set heading(numbering: (..nums) => { + let level = nums.pos().len() + if level == 1 { + // Appendix chapters: no dot + numbering("A", ..nums) + } else if level <= 3 { + // Appendix sections and subsections: with dots + numbering("A.1", ..nums) + } + // Level 4 and deeper: no numbering + }) + counter(heading).update(0) + + for appendix-content in appendices { + appendix-content + } + } +} diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/ai_notice.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/ai_notice.typ new file mode 100644 index 0000000000..dc3cca6520 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/ai_notice.typ @@ -0,0 +1,9 @@ += AI Notice + +== Development Assistance + +This thesis template and its accompanying tutorial documentation were developed with the assistance of Claude Opus 4, an AI language model created by Anthropic. The AI was utilized to: + +- Generate example content demonstrating template features +- Structure and organize the template codebase +- Help with the conversion from the existing LaTeX template into typst. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/appendix.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/appendix.typ new file mode 100644 index 0000000000..e8a8dde602 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/appendix.typ @@ -0,0 +1,3 @@ += Appendix + +Here you can put additional information such as code examples, detailed evaluation results and other stuff that does not quite fit into a chapter but is still interesting to the topic. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/background.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/background.typ new file mode 100644 index 0000000000..bd84865410 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/background.typ @@ -0,0 +1,18 @@ += Background + +== What is Typst? + +Typst is a modern markup-based typesetting system designed to be a powerful yet user-friendly alternative to LaTeX. Released in 2023, it combines the simplicity of Markdown with the typographic quality and programmability traditionally associated with LaTeX, making it an excellent choice for academic writing. + +Key advantages of Typst include: +- *Fast compilation*: Near-instantaneous preview updates as you type +- *Clear error messages*: Helpful diagnostics that pinpoint exactly what went wrong +- *Modern syntax*: Intuitive markup that's easier to learn than LaTeX +- *Built-in scripting*: Powerful programming capabilities for advanced customization +- *Excellent math support*: Beautiful mathematical typesetting out of the box + +== Why a Typst Template? + +While LaTeX has been the de facto standard for academic typesetting for decades, its steep learning curve and cryptic error messages can be cumbersome. This Typst template maintains compatibility with University of Basel's formatting requirements while offering a more approachable writing experience. + +The template handles all the formatting details automatically, allowing you to focus on your content rather than wrestling with compilation errors or obscure package conflicts. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/conclusion.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/conclusion.typ new file mode 100644 index 0000000000..c615b376e5 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/conclusion.typ @@ -0,0 +1,5 @@ += Conclusion + +This tutorial has demonstrated that Typst provides a viable, modern alternative to LaTeX for academic thesis writing. + +By adopting Typst, you can focus on your research and writing rather than fighting with compilation errors. I hope this template helps make thesis writing a more pleasant and productive experience. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/discussion.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/discussion.typ new file mode 100644 index 0000000000..2fd9451943 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/discussion.typ @@ -0,0 +1,5 @@ += Discussion + +Use the `lorem()` command to add some meaningful text quickly. + +#lorem(300) diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/evaluation.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/evaluation.typ new file mode 100644 index 0000000000..13930e61d1 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/evaluation.typ @@ -0,0 +1,5 @@ += Evaluation + +== Template Performance + +The UniBasel Typst template compiles in milliseconds, compared to several seconds for equivalent LaTeX documents. This instant feedback dramatically improves the writing workflow, especially when working with complex documents containing numerous figures and equations. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/future_work.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/future_work.typ new file mode 100644 index 0000000000..c9acba3f7e --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/future_work.typ @@ -0,0 +1,3 @@ += Future Work + +If you want to contribute to this template's development and improve its functionality, usability or just to fix an annoying bug, feel free to open a pull request on Github: https://github.com/Nifalu/dmi-thesis-typst-template diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/implementation.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/implementation.typ new file mode 100644 index 0000000000..713f9c2701 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/implementation.typ @@ -0,0 +1,181 @@ +#import "@preview/dmi-basilea-thesis:0.1.2": * + +// Or for local development +// #import "../../main.typ": * + += Implementation + +== Text Formatting + +=== Basic Formatting +You can use *bold text* for emphasis, _italic text_ for titles or foreign words, and `inline code` for technical terms. The template also supports #smallcaps[small capitals] for certain stylistic choices. + +Footnotes are created using the `#footnote` function#footnote[This is an example footnote. Footnotes are automatically numbered and appear at the bottom of the page.]. You can add them anywhere in your text#footnote[Multiple footnotes on the same page are handled automatically.]. + +For URLs, you have several options: +- Direct URL: https://www.unibas.ch +- Linked text: #link("https://www.unibas.ch")[University of Basel] + +=== Lists and Enumerations +Bullet points are created naturally: +- First item +- Second item with sub-items: + - Sub-item A + - Sub-item B +- Third item + +Numbered lists work similarly: +1. First step +2. Second step +3. Final step + +== Code Listings + +Code blocks are beautifully formatted with syntax highlighting: + +```python +def fibonacci(n): + """Calculate the nth Fibonacci number.""" + if n <= 1: + return n + return fibonacci(n-1) + fibonacci(n-2) +``` + +For inline code, simply use backticks: `let x = 42`. + +== Mathematical Formulas + +Typst excels at mathematical typesetting. Here's the famous Euler's identity: + +$ e^(i pi) + 1 = 0 $ + +More complex equations can be displayed prominently: + +$ integral_0^infinity e^(-x^2) d x = sqrt(pi)/2 $ + +You can also create aligned equations: + +$ sum_(k=1)^n k &= 1 + 2 + 3 + ... + n \ + &= (n(n+1))/2 $ + +== Figures and Tables +Figures can be inserted with captions and labels for cross-referencing: + +#figure( + image("../img/typst.png", width:80%), + caption: [Example figure showing the template's figure environment] +) + +As shown in @fig:example, figures are automatically numbered and can be referenced throughout the document. + +Tables are equally straightforward: + +#figure( + table( + columns: 3, + align: (left, center, right), + [*Language*], [*Type System*], [*Performance*], + [Typst], [Static], [Fast], + [LaTeX], [Macro-based], [Slow], + [Markdown], [None], [Very Fast], + ), + caption: [Comparison of different markup languages] +) + +@tab:comparison demonstrates the three-column table format with different alignments. + +== Custom Environments + +The template provides several custom environments for academic writing: + +#definition(title: "Definition 1")[ + A *markup language* is a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. +] + +#theorem(title: "Theorem 1")[ + For any typesetting system $T$, if $T$ is both powerful and user-friendly, then $T$ will eventually replace less user-friendly alternatives. +] + +== Multi-Column Layout + +#columns(2)[ + Sometimes you need to present content in multiple columns. This is particularly useful for: + + - Comparing two approaches + - Presenting definitions side by side + - Creating compact layouts for listings + + #colbreak() + + The column break command `#colbreak()` allows you to manually control where the column break occurs, giving you precise control over the layout. +] + +== Algorithms + +#algorithm( + caption: [Binary search algorithm] +)[ +``` +function binarySearch(arr, target): + left = 0 + right = length(arr) - 1 + + while left <= right: + mid = (left + right) / 2 + if arr[mid] == target: + return mid + else if arr[mid] < target: + left = mid + 1 + else: + right = mid - 1 + + return -1 +``` +] + +== Citations and References + +Citations are handled naturally using the \@ symbol: @turing1950 for single citations or @goodfellow2016 @vaswani2017 for multiple. The bibliography style can be customized in the main document. + +== Draft Features + +#context { + if thesis-draft-state.get() [ + The template includes helpful TODO markers for draft versions: + + #todo[Add more examples here] + #todo-missing[Include performance benchmarks] + #todo-check[Verify this equation] + #todo-revise[Improve this explanation] + #todo-citation[Add proper reference] + #todo-language[Check grammar] + #todo-question[Is this the best approach?] + #todo-note[Remember to update this section] + ] else [ + TODO markers are only visible in draft mode. Set `draft: false` in your document configuration to hide them in the final version. + ] +} + +== Cross-References + +The template supports automatic cross-referencing for all numbered elements. You can reference: +- Chapters: @methodology +- Sections: @background +- Figures: @fig:example +- Tables: @tab:comparison +- Equations: $ F = m a $ +- Custom labels: @eq:newton + +== Highlighting + +Use the #important[important] function to highlight crucial information. In colored mode, this appears as highlighted text; in non-colored mode, it becomes italicized. + +== Page Layout Features + +The template automatically handles: +- Chapter pages without headers +- Consistent margins and spacing +- Proper page numbering +- Language-specific formatting (English/German) + +All these features work together to create a professional, consistent document that meets academic standards while being easy to write and maintain. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/introduction.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/introduction.typ new file mode 100644 index 0000000000..865d4a61ee --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/introduction.typ @@ -0,0 +1,7 @@ += Introduction + +This thesis serves as a tutorial and demonstration of the UniBasel Typst thesis template. + +The template aims to simplify the thesis writing process by leveraging Typst's modern typesetting capabilities. Throughout this document, you'll find examples of citations @turing1950, cross-references, mathematical formulas, figures, tables, and other essential elements commonly used in academic writing. + +By the end of this tutorial, you should be familiar with all the template's features and be ready to write your own thesis using Typst. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/methodology.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/methodology.typ new file mode 100644 index 0000000000..65b9ec4554 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/methodology.typ @@ -0,0 +1,28 @@ += Methodology + +== Template Structure + +This template follows a modular approach to document organization, separating content from formatting. The key components include: + +=== Main Template File +The `template/main.typ` file contains all formatting definitions, including: +- Page layout and margins (3.5cm on all sides) +- Header and footer configuration +- Chapter and section styling +- Custom commands and environments +You can access all functionality provided by this file by importing it directly from the typst template repository: (adjust the version number as needed) +```typ +#import "@preview/unibas-thesis:0.1.0": * +``` + +=== Configuration +The template is configured through parameters passed to the `thesis` function in your main document: +```typ +#show: thesis.with( + title: "Your Title", + author: "Your Name", + // ... other parameters +) +``` + +This approach ensures consistency across all theses while allowing customization where needed. The template automatically handles language-specific elements (English/German) based on your language setting. diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/related_work.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/related_work.typ new file mode 100644 index 0000000000..96b5ddb2d8 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/content/related_work.typ @@ -0,0 +1,3 @@ += Related Work + +This Typst template is directly inspired by the LaTeX thesis template created by Ivan Giangreco: https://github.com/ivangiangreco/basilea-latex diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/img/typst.png b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/img/typst.png new file mode 100644 index 0000000000..4f720831a2 Binary files /dev/null and b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/img/typst.png differ diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/references.bib b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/references.bib new file mode 100644 index 0000000000..4bbf8dd2bf --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/references.bib @@ -0,0 +1,25 @@ +% references.bib + +@article{turing1950, + title={Computing machinery and intelligence}, + author={Turing, Alan M}, + journal={Mind}, + volume={59}, + number={236}, + pages={433--460}, + year={1950} +} + +@book{goodfellow2016, + title={Deep Learning}, + author={Goodfellow, Ian and Bengio, Yoshua and Courville, Aaron}, + year={2016}, + publisher={MIT Press} +} + +@inproceedings{vaswani2017, + title={Attention is all you need}, + author={Vaswani, Ashish and others}, + booktitle={Advances in Neural Information Processing Systems}, + year={2017} +} diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/src/template/thesis.typ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/thesis.typ new file mode 100644 index 0000000000..7aa8858480 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/src/template/thesis.typ @@ -0,0 +1,48 @@ +#import "@preview/dmi-basilea-thesis:0.1.2": * +// or for local testing: +// #import "../main.typ": * // This is for local testing + +#show: thesis.with( + draft: true, + colored: true, + title: "Thesis Template in Typst", + author: "Nico Bachmann", + email: "nico@nifalu.ch", + immatriculation: "2020-123-456", + supervisor: "Prof. Dr. John Smith", + examiner: "Prof. Dr. Alice Johnson", + faculty: "Faculty of Science, University of Basel", + department: "Department of Mathematics and Computer Science", + research-group: "Your Research Group", + website: "", + thesis-type: "Bachelor Thesis", + date: datetime.today(), + language: "en", + + abstract: [ + This is a demonstration / tutorial on the usage of the UniBasel Typst template. + ], + + acknowledgments: [ + Special thanks to the Typst community for creating such an excellent typesetting system. + ], + + chapters: ( + include "content/introduction.typ", + include "content/background.typ", + include "content/methodology.typ", + include "content/implementation.typ", + include "content/evaluation.typ", + include "content/discussion.typ", + include "content/conclusion.typ", + include "content/future_work.typ", + include "content/related_work.typ", + include "content/ai_notice.typ" + ), + + appendices: ( + include "content/appendix.typ", + ), + + bibliography-content: bibliography("references.bib", style: "ieee", title: none), +) diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/thumbnail-dark.svg b/packages/preview/dmi-basilea-thesis/0.1.2/thumbnail-dark.svg new file mode 100644 index 0000000000..e44db36efa --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/thumbnail-dark.svg @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/thumbnail-light.svg b/packages/preview/dmi-basilea-thesis/0.1.2/thumbnail-light.svg new file mode 100644 index 0000000000..e44db36efa --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/thumbnail-light.svg @@ -0,0 +1,562 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/preview/dmi-basilea-thesis/0.1.2/typst.toml b/packages/preview/dmi-basilea-thesis/0.1.2/typst.toml new file mode 100644 index 0000000000..3497d517c9 --- /dev/null +++ b/packages/preview/dmi-basilea-thesis/0.1.2/typst.toml @@ -0,0 +1,16 @@ +[package] +name = "dmi-basilea-thesis" +version = "0.1.2" +entrypoint = "src/main.typ" +authors = ["Nico Bachmann "] +license = "MIT" +description = "A thesis template for the dmi at the university of basel" +keywords = ["thesis", "bachelor", "master", "unibas", "dmi", "computer science"] +categories = ["thesis"] +disciplines = ["computer-science"] +repository = "https://github.com/Nifalu/dmi-basilea-thesis" + +[template] +path = "src/template" +entrypoint = "thesis.typ" +thumbnail = "src/assets/thumbnail.png"