Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0e09674
[Typship] Add example.pdf
chicoferreira Oct 16, 2025
f67a3ef
[Typship] Add LICENSE
chicoferreira Oct 16, 2025
1315229
[Typship] Add README.md
chicoferreira Oct 16, 2025
4b09516
[Typship] Add src\colors.typ
chicoferreira Oct 16, 2025
8cd8443
[Typship] Add src\cover.typ
chicoferreira Oct 16, 2025
3e68826
[Typship] Add src\formatting.typ
chicoferreira Oct 16, 2025
dfc2fa1
[Typship] Add src\lib.typ
chicoferreira Oct 16, 2025
c6da122
[Typship] Add template\appendix.typ
chicoferreira Oct 16, 2025
2d1ba32
[Typship] Add template\bibliography.yml
chicoferreira Oct 16, 2025
d6e8dad
[Typship] Add template\glossary.yaml
chicoferreira Oct 16, 2025
0092f85
[Typship] Add template\logos\cc\CCBY.png
chicoferreira Oct 16, 2025
0d3a4a2
[Typship] Add template\logos\cc\CCBYNC.png
chicoferreira Oct 16, 2025
40f0761
[Typship] Add template\logos\cc\CCBYNCND.png
chicoferreira Oct 16, 2025
cd71680
[Typship] Add template\logos\cc\CCBYNCSA.png
chicoferreira Oct 16, 2025
2d4a48f
[Typship] Add template\logos\cc\CCBYND.png
chicoferreira Oct 16, 2025
f8ba935
[Typship] Add template\logos\cc\CCBYSA.png
chicoferreira Oct 16, 2025
527a735
[Typship] Add template\logos\uminho\color\EE.jpg
chicoferreira Oct 16, 2025
f38ca5a
[Typship] Add template\logos\uminho\color\UM.jpg
chicoferreira Oct 16, 2025
ae95321
[Typship] Add template\logos\uminho\gray\EE.jpg
chicoferreira Oct 16, 2025
3df4323
[Typship] Add template\logos\uminho\gray\UM.jpg
chicoferreira Oct 16, 2025
a55e3b4
[Typship] Add template\main.typ
chicoferreira Oct 16, 2025
adde320
[Typship] Add template\preamble\abstract.typ
chicoferreira Oct 16, 2025
342ac71
[Typship] Add template\preamble\acknowledgements.typ
chicoferreira Oct 16, 2025
0092042
[Typship] Add template\preamble\copyright.typ
chicoferreira Oct 16, 2025
e23ec6a
[Typship] Add template\preamble\integrity.typ
chicoferreira Oct 16, 2025
cb83cc4
[Typship] Add thumbnail.png
chicoferreira Oct 16, 2025
26db311
[Typship] Add typst.toml
chicoferreira Oct 16, 2025
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 packages/preview/prometeu-thesis/0.1.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 chico ferreira

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.
48 changes: 48 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# prometeu-thesis

The unofficial Typst template for writing theses at the University of Minho (UMinho).

<img src="thumbnail.png" alt="Template cover thumbnail" width="300"/>

It is based on the [official LaTeX template provided by the Department of Informatics](https://web.di.uminho.pt/sitedi/latex/) and fully complies with the [university’s required formatting standards and guidelines](https://alunos.uminho.pt/PT/estudantes/Paginas/InfoUteisFormatacao.aspx).

This template closely follows the LaTeX version, while providing improvements in features, usability and presentation. It is designed to be as extensible, customizable, and comprehensible as possible right out of the box.

You can find the unmodified output of the template in [example.pdf](./example.pdf).

## How to use this template

### Setting up fonts

This template requires the following fonts: NewsGotT (001.005), NewsGotTBold (001.005) and NewsGoth Lt BT (2.001 mfgpctt 4.4).

Unfortunately, Typst [disallows font files to be bundled in packages](https://github.com/typst/packages/blob/main/docs/resources.md#fonts-are-not-supported-in-packages). The original fonts (.ttf files) should be grabbed from the zip file on the [official LaTeX template](https://web.di.uminho.pt/sitedi/latex/).

### Using on Typst Web

Create a new project by selecting "Start from template" and searching for this project. Then create a `fonts` folder in your project and add the three required fonts there.

### Using Locally

To work locally, first [install Typst](https://typst.app/open-source/), then initialize your project with:
```
typst init @preview/prometeu-thesis:0.1.0
```

Make the required fonts available by either installing them system-wide (use `typst fonts` to verify detection) or by placing them in a folder of your choice (e.g., `./fonts`) and referencing it via your Typst LSP settings or use the CLI option `--font-path <folder>`.

---

Always ensure that the output generated by this template complies with the latest formatting standards.

## Current Limitations

Currently, this template only supports covers for Master's theses and does not yet accommodate Doctoral (PhD) theses, and it is only available in English (there is no Portuguese version yet). Contributions to expand support are welcome.

By default, the template includes only the required School of Engineering logos for the cover, but you can easily change these to your own school's logo. The official and high-resolution logos are available in the [official formatting guidelines](https://alunos.uminho.pt/PT/estudantes/Paginas/InfoUteisFormatacao.aspx).

## License

This template is provided under the [MIT License](./LICENSE).

The official logos located in [template/logos/uminho](./template/logos/uminho) are the property of Universidade do Minho. They are not covered by the [LICENSE](./LICENSE) included with this template and remain under the copyright of the university.
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/src/colors.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#let pantone1807 = rgb("990000")
#let pantone159 = rgb("cc6633")
#let pantonecoolgray7 = rgb("97999b")
#let blueuminho = rgb("24A2DA")
82 changes: 82 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/src/cover.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#import "colors.typ"

#let render-cover(
author: [],
title: [],
date: [],
supervisors: (),
images: (),
gray-images: (),
school: [],
degree: []
) = [
#set text(fill: colors.pantonecoolgray7)

#set page(margin: (top: 0mm, bottom: 10mm, left: 79mm, right: 0mm))
#set par(spacing: 0pt)

#grid(
columns: 2,
..images.map(block.with(width: 26mm, height: 26mm)),
)

#v(8.72mm)

#[
#set par(leading: 0.4em)
#set text(size: 14.5pt)
*University of Minho*\
#text(font: "NewsGoth Lt BT", school)
]

#v(37.32mm)

#place(top + left, float: false, dy: 90mm)[
#set text(size: 17pt)
#set par(leading: 20.4pt - 0.75em, spacing: 25pt)

#author

*#title*
]

#align(bottom, text(size: 10pt, date))

#page(fill: colors.pantonecoolgray7)[]

#grid(
columns: 2,
..gray-images.map(block.with(width: 26mm, height: 26mm)),
column-gutter: 0.5mm,
)

#v(8.72mm)

#[
#set par(leading: 0.4em)
#set text(size: 14.5pt)
*University of Minho*\
#text(font: "NewsGoth Lt BT", school)
]

#place(top + left, float: false, dy: 90mm)[
#set text(size: 17pt)
#set par(leading: 20.4pt - 0.75em, spacing: 25pt)

#author

*#title*
]

#place(top + left, float: false, dy: 180mm)[
#set text(size: 14.5pt)
#set par(leading: 16.8pt - 0.75em, spacing: 25pt)

#degree

Dissertation supervised by\
#supervisors.map(text.with(weight: "bold")).join(linebreak())
]

#align(bottom, text(size: 10pt, date))
]
89 changes: 89 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/src/formatting.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#let chapter-count = counter("chapter counter")

#let part() = it => {
set align(center + horizon)
set text(25pt)
pagebreak(weak: true)

grid(
row-gutter: 1em,
[Part #context counter(heading).display()],
it.body,
)

v(4em) // Move the part title up
}

#let chapter(top: none) = it => {
chapter-count.step()
pagebreak(weak: true)
block(inset: (top: 30mm, bottom: 15mm), {
if top != none {
block(text(15pt, top), below: 7mm)
}
block(text(18pt, it.body))
})
}

#let chapter-with-top() = chapter(top: [Chapter #context chapter-count.display()])

#let section() = it => {
set text(16pt)
set block(above: 2.5em, below: 1.5em)
it
}

#let format-heading(..nums) = {
if nums.pos().len() == 1 {
numbering("I", ..nums) // Part
} else if nums.pos().len() == 2 {
numbering("1", chapter-count.get().first()) // Chapter
} else {
numbering("1.1", ..chapter-count.get(), ..nums.pos().slice(2)) // Section
}
}

#let show-main-content = it => {
// = Part
// == Chapter
// === Section
show heading.where(level: 1): part()
show heading.where(level: 2): chapter-with-top()
show heading.where(level: 3): section()

// Use chapter-count to number chapters and sections
set heading(numbering: format-heading)

it
}

#let show-appendix(content) = {
chapter-count.update(0)
show heading.where(level: 2): set heading(numbering: (..) => chapter-count.display("A"))
show heading.where(level: 2): chapter(top: [Appendix #context chapter-count.display("A")])
content
}

#let show-preamble(content) = {
set page(numbering: "i")
counter(page).update(1)

// Set level 1 heading to be chapters and level 2 headings to be sections (needed because of Part support)
show heading.where(level: 1): chapter()
show heading.where(level: 2): section()

// Preamble should not be included in the outline
set heading(outlined: false)

content

chapter-count.update(0)
counter(page).update(1)
}

#let show-postamble(content) = {
show heading.where(level: 1): chapter()
set heading(numbering: none)

content
}
49 changes: 49 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/src/lib.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#import "colors.typ"
#import "cover.typ": render-cover
#import "formatting.typ"

#let author-state = state("author", [])
#let date-state = state("date", [])

#let thesis(
author: "",
title: [],
date: [],
supervisors: (),
cover-images: (),
cover-gray-images: (),
school: [],
degree: [],
) = doc => {
set text(font: "NewsGotT", size: 12pt)
set par(leading: 0.95em, spacing: 1.9em)
show footnote.entry: set text(size: 8pt)
show link: set text(fill: colors.blueuminho)

set document(title: title, author: author)

author-state.update(author)
date-state.update(date)

render-cover(
author: author,
title: title,
date: date,
supervisors: supervisors,
images: cover-images,
gray-images: cover-gray-images,
school: school,
degree: degree,
)

// Fake italic as NewsGotT doesn't have an italic style
// Change regex if italic is broken when changing lines
show emph: it => {
show regex("\S+"): it => box(skew(ax: -18.4deg, reflow: false, it))
it
}

set page(margin: 25mm, numbering: "1")

doc
}
34 changes: 34 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/template/appendix.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
= Appendices

== Support work

Auxiliary results which are not main-stream.

== Details of results

Details of results whose length would compromise readability of main text.

== Listings

Should this be the case.

#show raw: set block(
fill: gray.lighten(80%),
radius: 10pt,
inset: 1.5em,
)

#figure(
```haskell
factorial :: Integer -> Integer
factorial 0 = 1
factorial n = n * factorial (n-1)
```,
caption: [Factorial function],
)

== Tooling

(Should this be the case)

Anyone using @latex should start using #link("https://typst.app/")[Typst].
48 changes: 48 additions & 0 deletions packages/preview/prometeu-thesis/0.1.0/template/bibliography.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
clang:
type: Book
author:
- name: "B.W. Kernighan"
- name: "D.M. Ritchie"
title: "The C Programming Language (ANSI C)"
edition: "2nd"
publisher:
name: "Prentice Hall Software series"
year: 1988
keywords:
- "Programming"
- "Imperative"

functional:
type: Web
author:
- name: "R. Bird"
- name: "P. Wadler"
title: "Introduction to Functional Programming"
publisher:
name: "Prentice-Hall"
year: 1988
keywords:
- "Programming"
- "Functional"

rustbook:
type: Web
title: "The Rust Programming Language"
year: 2024
url: "https://doc.rust-lang.org/book/"
keywords:
- "Rust"
- "Programming"
- "Systems Programming"

typstdocs:
type: Web
title: "Typst Documentation"
publisher:
name: "Typst"
year: 2024
url: "https://typst.app/docs/"
keywords:
- "Typst"
- "Document Preparation"
- "Typesetting"
Loading