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
43 changes: 13 additions & 30 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
margin: if paper-size == "a4" {
(x: 41.5pt, top: 80.51pt, bottom: 89.51pt)
} else {
(x: (50pt / 216mm) * 100%, top: (55pt / 279mm) * 100%, bottom: (64pt / 279mm) * 100%)
(
x: (50pt / 216mm) * 100%,
top: (55pt / 279mm) * 100%,
bottom: (64pt / 279mm) * 100%,
)
},
header: header,
numbering: "1/1",
Expand Down Expand Up @@ -92,8 +96,9 @@

// Configure headings.
set heading(numbering: "I.A.1.")
show heading: it => locate(loc => {
show heading: it => {
// Find out the final number of the heading counter.
let loc = it.location()
let levels = counter(heading).at(loc)
let deepest = if levels != () {
levels.last()
Expand All @@ -105,7 +110,7 @@
if it.level == 1 [
// First-level headings are centered smallcaps.
// We don't want to number of the acknowledgment section.
#let is-ack = it.body in ([Acknowledgment], [Acknowledgement])
#let is-ack = it.body in ([Acknowledgment], [Acknowledgment])
#set align(center)
#set text(if is-ack {
10pt
Expand Down Expand Up @@ -139,7 +144,7 @@
}
_#(it.body):_
]
})
}

// Display the assignments's title.
v(3pt, weak: true)
Expand All @@ -151,9 +156,10 @@
let end = calc.min((i + 1) * 4, authors.len())
let is-last = authors.len() == end
let slice = authors.slice(i * 4, end)
grid(columns: slice.len() * (
1fr,
), gutter: 12pt, ..slice.map(author => align(
grid(columns: slice.len()
* (
1fr,
), gutter: 12pt, ..slice.map(author => align(
center,
{
text(12pt, author.name)
Expand Down Expand Up @@ -183,8 +189,7 @@

// Start two column mode and configure paragraph properties.
show: columns.with(2, gutter: 12pt)
set par(justify: true, first-line-indent: 1em)
show par: set block(spacing: 0.65em)
set par(justify: true, first-line-indent: 1em, spacing: 0.65em)

// Display abstract and index terms.
if abstract != none [
Expand Down