Hi,
I wanted to typeset the old LaTeX (which i rewrote myself as well) of my uni in Typst, I have managed to get everything except one thing. I can’t get the outline to look like the original TeX output.
here is an example:
best I was able to produce is this:
// Outline setup
#let docTableOfContents(body) = {
set heading(numbering: "1.1")
// set upper distance of level 1 heading
show outline.entry.where( level: 1 ): set block(above: 24pt)
// indents heading numbers level 2+
set outline(indent: n => if n == 0 { 0em } else { 1em })
// max depth
set outline(depth: 4)
outline()
body
}
// and call like this in main
#show: docTableOfContents
which produces this:
(ignore that the lack of unnumbered sections and roman numeral pages, have not touched that yet)
the missing features of the TeX template are marked to be obvious. they are:
- Bold level 1
- aligned text/body for level 2 an higher
- right aligned fill, which does not react to number width
- no fill for level 1 entry
From what I can tell, the outline.entry function is what I want but I honestly don’t get how it operates from the examples in the typst docs.
If someone could help me a bit, I would be rather grateful.
The alignment on the left would be the most important, the rest is “ok” if it does not quite equate to the original

