#import "@preview/tablex:0.0.7": tablex, cellx
#import "/template.typ": *
#apply(page-numbering: "(i)" , [
#align(center, [== Contents])
#let heading-format(content) = cellx(align: center + horizon, content)
#let col-aligns = (right, auto, center + horizon, center + horizon, auto)
#let preprocess-alist(l, lpno) = {
let i = 0
let e = l.len() - 1
let nl = ()
while i < e {
let it = l.at(i)
i = i + 1
let nit = l.at(i)
it.at(2) = [ #it.at(2) - #{nit.at(2) - 1} ]
it.push([])
nl.push(it)
}
l.at(e).at(2) = [ #{l.at(e).at(2)} - #lpno ]
l.at(e).push([])
nl.push(l.at(e))
nl
}
#list-of-assignments((l, lpno) =>
tablex(
columns: (3em, 1fr, 4em, 8em, 10em),
stroke: 1pt + gray,
map-cols: (i, cells) => (cells.first(), ..cells.slice(1).map(cell => (..cell, align: col-aligns.at(i)))),
heading-format[*Sl.* \ *No.*], heading-format[*Description*], heading-format[*Page No.*], heading-format[*Date*], heading-format[*Teacher’s* \ *Signature*],
..preprocess-alist(l, lpno).flatten(),
))
])
#colbreak()
#counter(page).update(0)