Hi,
in one of my main.typ files I use the following:
// Configure page properties.
#set page(
numbering: “1”,
// The header always contains the book title on odd pages and
// the chapter title on even pages, unless the page is one
// that starts a chapter (the chapter title is obvious then).
header: locate(loc => {
// Are we on an odd page?
let i = counter(page).at(loc).first()
if calc.odd(i) {
return text(0.95em, smallcaps(title))
}
// Are we on a page that starts a chapter? (We also check
// the previous page because some headings contain pagebreaks.)
let all = query(heading, loc)
if all.any(it => it.location().page() in (i - 1, i)) {
return
}
// Find the heading of the section we are currently in.
let before = query(selector(heading).before(loc), loc)
if before != () {
align(right, text(0.95em, smallcaps(before.last().body)))
}
}),
)
Hallo Welt
Today the TYPST compiler shows the following error message:
Can anybody show/explain me how to fix this error to re-enable preview?
