|
33 | 33 | margin: if paper-size == "a4" {
|
34 | 34 | (x: 41.5pt, top: 80.51pt, bottom: 89.51pt)
|
35 | 35 | } 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 | + ) |
37 | 41 | },
|
38 | 42 | header: header,
|
39 | 43 | numbering: "1/1",
|
|
92 | 96 |
|
93 | 97 | // Configure headings.
|
94 | 98 | set heading(numbering: "I.A.1.")
|
95 |
| - show heading: it => locate(loc => { |
| 99 | + show heading: it => { |
96 | 100 | // Find out the final number of the heading counter.
|
| 101 | + let loc = it.location() |
97 | 102 | let levels = counter(heading).at(loc)
|
98 | 103 | let deepest = if levels != () {
|
99 | 104 | levels.last()
|
|
105 | 110 | if it.level == 1 [
|
106 | 111 | // First-level headings are centered smallcaps.
|
107 | 112 | // 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]) |
109 | 114 | #set align(center)
|
110 | 115 | #set text(if is-ack {
|
111 | 116 | 10pt
|
|
139 | 144 | }
|
140 | 145 | _#(it.body):_
|
141 | 146 | ]
|
142 |
| - }) |
| 147 | + } |
143 | 148 |
|
144 | 149 | // Display the assignments's title.
|
145 | 150 | v(3pt, weak: true)
|
|
151 | 156 | let end = calc.min((i + 1) * 4, authors.len())
|
152 | 157 | let is-last = authors.len() == end
|
153 | 158 | 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( |
157 | 163 | center,
|
158 | 164 | {
|
159 | 165 | text(12pt, author.name)
|
|
183 | 189 |
|
184 | 190 | // Start two column mode and configure paragraph properties.
|
185 | 191 | 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) |
188 | 193 |
|
189 | 194 | // Display abstract and index terms.
|
190 | 195 | if abstract != none [
|
|
0 commit comments