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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2025 Robert Richter

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.
70 changes: 70 additions & 0 deletions packages/preview/cleanified-hpi-research-proposal/0.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Cleanified HPI Research Proposal

A clean-aesthetic template for writing a research proposal.

## Getting Started

```
typst init @preview/cleanified-hpi-research-proposal:0.2.0
```

## Configuration

An example configuration is located in [`example/`](./example/main.typ).

```typst
#import "@preview/cleanified-hpi-research-proposal:0.2.0": *

#show: project.with(
title: "My Very Long, Informative, Expressive, and Definitely Fancy Title",
author: "Max Mustermann",
date: "Febuary 29, 2025",
chair: "Data-Intensive Internet Computing",
additional-logos: (image("path/to/my/logo.png"),),
enable-hpi-logo: true,
enable-up-logo: true,
abstract: [#lorem(100)]
)

= Introduction
#lorem(80)

== Contributions
#lorem(40)

=== Really Small Stuff
#lorem(20)

= Related Work
#lorem(500)
```

**Required parameters**

| Parameter | Type | Usage |
|-----------|------|-------|
| `title` | string | Title of the proposal |
| `author` | string | Author of the proposal |
| `date` | string | Date of the proposal |
| `chair` | string | HPI Chair the proposal is proposed to |

**Optional parameters**

| Parameter | Type | Usage | Default |
|-----------|------|-------|---------|
| `additional-logos` | image array | Further logos on the proposal. Logos listed as images in an array. styling should be evicted. | `()` |
| `hpi-logo-index` | int | Index at which the HPI logo should be displayed. 0 means the HPI logo is the first logo. | `0` |
| `enable-hpi-logo` | boolean | Whether to include the HPI logo in the proposal. | true |
| `enable-up-logo` | boolean | Whether to include the University of Potsdam logo in the proposal. Be reminded that externally published work needs to include HPI and UP logo. | `false` |
| `abstract` | content | The abstract of the work. | `[]` |
| `abstract-formatting` | dictionary | Special formatting for the abstract. Will be applied to a [text function](https://typst.app/docs/reference/text/text/). | ```(fill: rgb("2e2e2e"), style: "italic")``` |
| `enable-toc` | boolean | Whether to include a table of contents in the work. | `true` |
| `double-column` | boolean | Turns the document into double or single-column format. | `false` |

## Copyright Notes

Please note that Hasso Plattner Institute logo is subject to a copyright ([HPI Logo Usage Guidelines](https://hpi.de/en/imprint/)). Same applies for the logo of the University of Potsdam and their [copyright guidelines](https://www.uni-potsdam.de/fileadmin/projects/zim/files/MMP/PDF_Dateien_MMP/250509-Leitfaden_DigitalPrint-web.pdf).

## You like this template? Consider supporting!

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://coff.ee/robert.richter)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#import "@preview/cleanified-hpi-research-proposal:0.2.0": *

#show: project.with(
title: "My Very Long, Informative, Expressive, and Definitely Fancy Title",
author: "Max Mustermann",
date: "Febuary 29, 2025",
chair: "Data-Intensive Internet Computing",
enable-toc: true,
enable-up-logo: true,
abstract: [],
double-column: false,
)

= Introduction
#lorem(200)

== Related Work
#lorem(200)

= Conclusion
#lorem(150)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
#import "@preview/biceps:0.0.1": *

#let project(
// The title of the research proposal
title: "",

// The author of the research proposal
author: "",

// Date of the research proposal
date: "",

// Chair where the research will be conducted
chair: "",

// Additional logos the research should be conducted with
additional-logos: (),

// Define at which position the HPI Logo should be at
hpi-logo-index: 1,

// Enable or Disable HPI logo
enable-hpi-logo: true,

// Enable or Disable University of Potsdam Logo
enable-up-logo: false,

// An abstract
abstract: [],

// Abstract formatting; used in the text function.
abstract-formatting: (),

// Enable table of contents
enable-toc: true,

// Use a double-column layout
double-column: false,

body,
) = {
let column-num = 1
if double-column {
column-num = 2
}

// Set the document's basic properties.
set document(author: author, title: title)
set page(
margin: (left: 15mm, right: 15mm, top: 20mm, bottom: 15mm),
numbering: none,
number-align: end,
columns: column-num,
)

let font-size-reduction = 0pt
if double-column {
font-size-reduction = 1pt
}
set text(font: "Libertinus Serif", size: 9pt - font-size-reduction, lang: "en")
show math.equation: set text(weight: 400)

// Shows paragraph breaks by only indending the following paragraph.
set par(
first-line-indent: 1.5em, // Indent the first line of paragraphs
spacing: 0.65em, // Remove extra space between paragraphs (or use your baseline)
)

// Configure page properties.
set page(
header: context {
// Are we on a page that starts a chapter?
let i = here().page()
if i == 1 {
return
}

// Find the heading of the section we are currently in.
let before = query(selector(heading).before(here()))
if before != () {
set text(0.95em)
let header = before.last().body
let author = text(style: "italic", author)
grid(
columns: (1fr, 10fr, 1fr),
align: (left, center, right),
if calc.even(i) [#i],
// Swap `author` and `title` around, or possibly with `heading`
// to change what is displayed on each side.
if calc.even(i) { author } else { title },
if calc.odd(i) [#i],
)
}
align(center, line(length: 100%, stroke: 0.5pt))
}
)


// Configure chapter headings.
show heading.where(level: 1): it => {
// Create the heading numbering.
let number = if it.numbering != none {
counter(heading).display(it.numbering)
h(7pt, weak: true)
}

if not double-column {
v(1%)
}
text(size: 13pt - font-size-reduction, weight: "bold", block([#number #it.body]))

if double-column {
v(0.2em)
} else {
v(0.5em)
}
}

// Configure chapter headings.
show heading.where(level: 2): it => {
// Create the heading numbering.
let number = if it.numbering != none {
counter(heading).display(it.numbering)
h(7pt, weak: true)
}

v(0.7%)
text(size: 12pt - font-size-reduction, fill: rgb("#404040"), weight: "bold", block([#number #it.body]))
v(0.3em)
}

// Configure chapter headings.
show heading.where(level: 3): it => {
// Create the heading numbering.
let number = if it.numbering != none {
counter(heading).display(it.numbering)
h(7pt, weak: true)
}

v(0.7%)
text(size: 11pt - font-size-reduction, fill: rgb("#404040"), weight: "bold", block([#number #it.body]))
}

set heading(numbering: "1.1.1.1.1 ·")

let _logos = additional-logos

if enable-up-logo {
_logos.push(image("up-logo.svg", height: 50pt))
}

if enable-hpi-logo {
hpi-logo-index = calc.min(hpi-logo-index, _logos.len())
_logos.insert(hpi-logo-index, image("hpi-logo.svg", height: 50pt))
}

if _logos.len() > 6 {
panic("Cannot display this template with more than 6 logos.")
}

let column_widths = (3fr, 1fr)
if _logos.len() == 2 {
column_widths = (4fr, 2fr,)
} else if _logos.len() > 2 {
column_widths = (1fr,)
}
// Heading of the proposal
// Also contains the logos if less than 3 are used
place(top,
scope: "parent",
float: true,
grid(
columns: column_widths,
grid.cell(block[
#text(title, size: 18pt, weight: "bold") \ \ // Excluded from font size reduction
#text(author, style: "italic") --
#text(date, style: "italic") \
Chair of #text(chair)
]),
if _logos.len() == 1 {
grid.cell(
align(horizon + center, _logos.at(0))
)
} else if (_logos.len() == 2) {
align(center+ horizon,
grid(
columns: (1fr, 1fr),
_logos.at(0),
_logos.at(1)
)
)
}
)
)

// If more than 2 logos are used, they are displayed here
// below the title
if _logos.len() > 2 {
// At most 6 logos. More logos will panic.
let height = 36pt
align(horizon + center,
grid(
columns: (1fr, 1fr, 1fr, 1fr, 1fr, 1fr),
rows: 36pt,
_logos.at(0),
_logos.at(1),
_logos.at(2),
if _logos.len() > 3 { _logos.at(3) } else { [] },
if _logos.len() > 4 { _logos.at(4) } else { [] },
if _logos.len() > 5 { _logos.at(5) } else { [] },
)
)
}

if abstract != [] {
let default-abstract-formatting = (
fill: rgb("#2e2e2e"),
style: "italic",
)

if abstract-formatting == () {
abstract-formatting = default-abstract-formatting
} else {
if not abstract-formatting.keys().contains("fill") {
abstract-formatting.fill = default-abstract-formatting.fill
}
if not abstract-formatting.keys().contains("style") {
abstract-formatting.style = default-abstract-formatting.style
}
}

let abstract-width = 100%
box([
#text([*Abstract*], ..abstract-formatting).
#text([#abstract], ..abstract-formatting)
], width: abstract-width)
}

// Outline
// Does not show heading lower than level 2.
if enable-toc {
v(1em)
line(length: 100%)
if double-column {
v(-0.8em)
} else {
v(-1.6em)
}
outline(depth: 2)
if double-column {
v(1em)
} else {
v(0.5em)
}
}

line(length: 100%)

// Main body.
set par(justify: true)

body
}
Loading