Hello, I’m using Typst to write my thesis. I’m currently trying to customize my lists of figures. I’d like to write a show rule that changes the body of each outline entry without affecting the indentation, prefix, fill, or page number.
Here’s two things I’ve tried so far. In these examples I’m trying to rebuild the outline entry without modifying its appearance at all (if this works then I’ll replace it.body()
with something else). They’re both based on this page on the website, but with it.inner()
broken up into its components. As you can see, simply concatenating it.body()
with it.fill
and it.page()
puts undesirable line breaks between all of them. I thought I could fix this by putting them in a horizontal grid
, but then the fill isn’t long enough when the body is multiple lines long.
Minimum working example
#show outline.entry: it => link(
it.element.location(),
it.indented(
it.prefix(),
it.body() + it.fill + it.page(),
),
)
#outline()
#show outline.entry: it => link(
it.element.location(),
it.indented(
it.prefix(),
grid(columns: (auto, 1fr, auto), align: bottom, it.body(), it.fill, it.page()),
),
)
#outline()
= a really really really long loooooooooooooooooooooooooooooooooong maaaaaaaaaaaaaaaaaaaaaaaaan
Is there a way to put these three things together in-line rather than as paragraphs or as columns in a grid? How does outline.entry.inner()
do it?