Skip to content

polimi-phd-thesis:0.1.1 #2293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions packages/preview/polimi-phd-thesis/0.1.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Typst package
template/main.pdf
674 changes: 674 additions & 0 deletions packages/preview/polimi-phd-thesis/0.1.1/LICENSE

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions packages/preview/polimi-phd-thesis/0.1.1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# polimi-phd-thesis 🎓

Elegant and simple thesis template for [Typst](https://typst.app/), a modern typesetting program alternative to LaTeX. I based the design of the document on the following two templates:

- [PhD Thesis Template](https://www.overleaf.com/latex/templates/phd-thesis-template/nwjkggvhrzmz)
- [DEIB PhD Thesis Template](https://www.overleaf.com/latex/templates/politecnico-di-milano-deib-phd-thesis-template/ydsvtyzwxfdk)

They are rather similar. The main difference is the PoliBlu colour spread across the headings. I recommend to check them out.

> [!NOTE]
> See the [manual](https://victuarvi.github.io/PoliMi-PhD-Thesis/docs/manual.pdf) for more informations.

## Preview ✨

<p align="center">
<img alt="Frontspiece" src="thumbnail.png" width="45%">
</p>

## Usage 🖋

Compile with:

```shell
typst c main.typ --pdf-standard a-3b
```

A very simple document:

```typ
#import "@preview/polimi-phd-thesis:0.1.1": *

#show: polimi-thesis.with(
title: "Thesis Title",
author: "Vittorio Robecchi",
advisor: "Prof. Donatella Sciuto",
coadvisor: "Prof. Antonio Capone",
tutor: "Prof. Marco Bramanti",
colored-headings: true
)

#show: frontmatter.with()

// abstract in English

// sommario in Italian

#show: acknowledgements.with()

// acknowledgements

#toc
#list_of_figures
#list_of_tables
#let nomenclature_ = (
"key" : "value"
)
#nomenclature(
nomenclature_,
indented: true
)

#show: mainmatter.with()

// main section of the thesis

#show: backmatter.with()

// backmatter

#show: appendix.with()

// appendix

#show: backmatter.with()

// bibliography

#show: acknowledgements.with()

// acknowlegments
```

The full list of options is as follows:
- `title`: title of the thesis
- `author`: name and surname of the author
- `advisor`: name and surname of the advisor
- `coadvisor`: name and surname of the coadvisor (can be empty)
- `tutor`: name and surname of the tutor
- `phdcycle`: PhD cycle of the thesis (defaults to current year)
- `language`: language of the thesis
- `colored-headings`: whether to use colored headings or not
- `main-logo`: main logo of the thesis

See the `docs/` folder for a thorough example on how to style the thesis.

# Contributing 🚀

If you happen to have suggestions, ideas or anything else feel free to open issues and pull requests.
28 changes: 28 additions & 0 deletions packages/preview/polimi-phd-thesis/0.1.1/docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

If you want to test the package, you must clone the repository in the local packages folder; depending on your operating system it will be:

- `$XDG_DATA_HOME` or `~/.local/share` on Linux
- `~/Library/Application Support` on macOS
- `%APPDATA%` on Windows

Then, the structure will be `typst/packages/local/{package.name}/{package.version}` where `name` and `version` are matching the `typst.toml` file. In this project they are `polimi-phd-thesis` and `0.1.1`.

Finally, create a new project with:

```shell
typst init "@local/{package.name}:{package.version}"
```

See the [official documentation](https://github.com/typst/packages?tab=readme-ov-file#local-packages).

> [!TIP]
> Create a symlink to the location Typst needs to the location where the repository is. For instance in a Linux environment it would be:
>
> ```shell
> mkdir ~/.local/share/typst/packages/local/PACKAGE.NAME
> ln -s REPO_FOLDER \
> ~/.local/share/typst/packages/local/PACKAGE.NAME/PACKAGE.VERSION
> ```
>
> You could do the same for the `preview` namespace, will be the one used for the template on Typst Universe.
Binary file not shown.
48 changes: 48 additions & 0 deletions packages/preview/polimi-phd-thesis/0.1.1/docs/manual.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#import "@preview/polimi-phd-thesis:0.1.1": *

#show: polimi-thesis.with(
title: [`polimi-phd-thesis` manual],
author: "Vittorio Robecchi",
language: "en",
)

#show: frontmatter.with()

#include "sections/abstract.typ"

#toc
#list-of-figures
#list-of-tables

#let nomenclature_ = (
"Polimi": "Politecnico di Milano",
"CdL": "Corso di Laurea",
"CCS": "Consigli di Corsi di Studio",
"CFU": "Crediti Formativi Universitari",
)

#nomenclature(
nomenclature_,
indented: false,
)

#show: mainmatter.with()

#include "sections/chapter_1.typ"
#include "sections/chapter_2.typ"

#show: appendix.with()

#include "sections/appendix_1.typ"
#include "sections/appendix_2.typ"

#show: acknowledgements.with()

#include "sections/acknowledgements.typ"

#show: backmatter.with()

#bibliography(
"../template/Thesis_bibliography.bib",
full: true,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
= Abstract

#for i in range(0, 2) {
lorem(100) + parbreak()
}

= Sommario

#for i in range(0, 2) {
lorem(100) + parbreak()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
= Acknowledgements

#for i in range(0, 8) {
lorem(100) + parbreak()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
= Appendix A

#for i in range(0, 5) {
lorem(100) + parbreak()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
= Appendix B

#for i in range(0, 5) {
lorem(100) + parbreak()
}
Loading