Initial commit
This commit is contained in:
18 files changed
+1852
No files matched your search
@@ -0,0 +1,49 @@
|
||||
#let _student-names(students) = {
|
||||
if type(students) == str {
|
||||
students
|
||||
} else {
|
||||
students.join(", ")
|
||||
}
|
||||
}
|
||||
|
||||
#let exercise-overview(exercises, students, tutor, col: black, border: gray, tutor-label: none) = {
|
||||
let text-color = col.darken(25%)
|
||||
let _s = 0.4pt + border
|
||||
|
||||
set par(justify: false)
|
||||
|
||||
grid(
|
||||
columns: (1fr, 1fr),
|
||||
column-gutter: 1em,
|
||||
stroke: (bottom: 0.5pt + text-color),
|
||||
inset: (y: 0.75em),
|
||||
align: bottom,
|
||||
grid(
|
||||
columns: 2,
|
||||
column-gutter: 1em,
|
||||
text(fill: text-color)[Name:], _student-names(students),
|
||||
),
|
||||
grid(
|
||||
columns: 2,
|
||||
column-gutter: 1em,
|
||||
text(fill: text-color)[#if tutor-label != none { tutor-label } else { [Tutor:] }], tutor,
|
||||
),
|
||||
)
|
||||
|
||||
let ex_cells = ()
|
||||
for i in range(1, exercises + 1) {
|
||||
ex_cells += (table.cell(stroke: (right: _s, bottom: _s))[A#i],)
|
||||
}
|
||||
|
||||
v(0.75cm)
|
||||
|
||||
set text(fill: text-color)
|
||||
table(
|
||||
columns: (1fr,) * (exercises + 1),
|
||||
align: center,
|
||||
stroke: none,
|
||||
..ex_cells,
|
||||
table.cell(stroke: (bottom: _s))[$Sigma$],
|
||||
..(table.cell(stroke: (right: _s), inset: (y: 0.75em))[],) * exercises,
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user