Hi,
Does anyone know how I could design such heading designs in Typst ? Especially with the ToC snippet at the beginning of each chapter.
Thanks!
Hi,
Does anyone know how I could design such heading designs in Typst ? Especially with the ToC snippet at the beginning of each chapter.
Thanks!
There was a similar question yesterday about an outline that only shows the (child) headings from the current chapter. This should help you to get started, feel free to ask if you have further questions. How to `show` an outline at each level 1 heading for all its child headings?
Hey. Here is a quick mock-up:
#import "@preview/suboutline:0.3.0": suboutline
#set heading(numbering: "1.1")
#show heading: set text(11pt, weight: "regular")
#show heading.where(level: 1): it => {
{
set align(right)
set par(spacing: 5mm)
let number = counter(heading.where(level: 1)).display()
text(90pt, rgb("#cd5454"), strong(number))
parbreak()
text(20pt, it.body)
}
line(length: 100%)
show outline.entry: it => {
let body = {
box(stroke: red, outset: 1pt)[#it.prefix()#h(1.5em)#it.body()]
h(4mm)
box(width: 1fr, it.fill)
h(7mm)
it.page()
}
pad(left: 1.5cm, right: 1cm, link(it.element.location(), body))
}
suboutline(fill: repeat(gap: 0.5em)[.])
line(length: 100%)
}
= Introduction
== Motivation
#lorem(20)
#pagebreak()
#pagebreak()
== Contribution
#lorem(10)
Hello @torvic,
I’ve changed your post title to keep up with the questions guidelines. For future question posts, choose a title which you would ask a friend!