Skip to content

Commit a2ddbc2

Browse files
otytlandsvikmrtz-j
authored andcommitted
fix: compatible with 0.13 compiler
1 parent fcc8c66 commit a2ddbc2

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

template.typ

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@
3333
margin: if paper-size == "a4" {
3434
(x: 41.5pt, top: 80.51pt, bottom: 89.51pt)
3535
} else {
36-
(x: (50pt / 216mm) * 100%, top: (55pt / 279mm) * 100%, bottom: (64pt / 279mm) * 100%)
36+
(
37+
x: (50pt / 216mm) * 100%,
38+
top: (55pt / 279mm) * 100%,
39+
bottom: (64pt / 279mm) * 100%,
40+
)
3741
},
3842
header: header,
3943
numbering: "1/1",
@@ -92,8 +96,9 @@
9296

9397
// Configure headings.
9498
set heading(numbering: "I.A.1.")
95-
show heading: it => locate(loc => {
99+
show heading: it => {
96100
// Find out the final number of the heading counter.
101+
let loc = it.location()
97102
let levels = counter(heading).at(loc)
98103
let deepest = if levels != () {
99104
levels.last()
@@ -105,7 +110,7 @@
105110
if it.level == 1 [
106111
// First-level headings are centered smallcaps.
107112
// We don't want to number of the acknowledgment section.
108-
#let is-ack = it.body in ([Acknowledgment], [Acknowledgement])
113+
#let is-ack = it.body in ([Acknowledgment], [Acknowledgment])
109114
#set align(center)
110115
#set text(if is-ack {
111116
10pt
@@ -139,7 +144,7 @@
139144
}
140145
_#(it.body):_
141146
]
142-
})
147+
}
143148

144149
// Display the assignments's title.
145150
v(3pt, weak: true)
@@ -151,9 +156,10 @@
151156
let end = calc.min((i + 1) * 4, authors.len())
152157
let is-last = authors.len() == end
153158
let slice = authors.slice(i * 4, end)
154-
grid(columns: slice.len() * (
155-
1fr,
156-
), gutter: 12pt, ..slice.map(author => align(
159+
grid(columns: slice.len()
160+
* (
161+
1fr,
162+
), gutter: 12pt, ..slice.map(author => align(
157163
center,
158164
{
159165
text(12pt, author.name)
@@ -183,8 +189,7 @@
183189

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

189194
// Display abstract and index terms.
190195
if abstract != none [

0 commit comments

Comments
 (0)