I have the following template, which used to work fine. However, when the new typst
version came, it places
((..) => ..,)
at the bottom of the page, instead of the page number.
Could you please help me? Thanks!
#let conf(lang: "en",
title: none,
author: [My full name],
date: datetime.today().display(),
doc,) = {
set page(
paper: "a4",
numbering: "1",
footer: context(
loc => {
let page-number = counter(page).at(loc).first()
let match-list = query(selector(<turn-on-page-numbering>).before(loc), loc)
if match-list == () { return none }
align(center, str(page-number))
},
),
)
set par(justify: true)
set text(
font: "Libertinus Serif",
size: 12pt,
lang: lang,
)
set heading(numbering: "1.")
show: rest => {
for i in (5,6) {
rest = {
show heading.where(level: i): it => strong(it.body)
rest
}
}
rest
}
show heading: it => {
it
v(0.5em)
}
set enum(indent: 1em)
set list(indent: 1em)
set align(center)
text(17pt, weight: "bold", title)
v(2em)
text(15pt, author)
v(1.5em)
text(15pt, date)
pagebreak()
set align(left)
set par(justify: true)
set enum(full: true, numbering: (..n) => {
let format = if n.pos().len() > 1 {"a)"} else {"1."}
numbering(format, n.pos().last())})
doc
}