Howdy,
I have headers that are more than one line long, how can I truncate them to fit on the top of page with hydra? One approach I tried was to use the chomp package with truncate-to-fit:
#set page(
header: context {
{
hydra(1, display: (
_,
it,
) => {
truncate-to-fit(
it.body,
height: 2em,
suffix: "...",
)
})
}
},
)
Yields this error:
error: element sequence has no method `len`
┌─ @preview/chomp:0.1.0/src/lib.typ:66:22
│
66 │ let high = string.len()
│ ^^^
Which I believe is because the hydra header (it.body) is content? Rather than the string truncate-to-fit expects.
Other approaches fail in a similar way, not being able to modify the hydra header because it is content.
Thanks for the help in advance,