Skip to content

Commit

Permalink
Add chapter styling for = header (#29)
Browse files Browse the repository at this point in the history
* Add chapter styling for `=` heading

Adds a chapter which implements a weak pagebreak before
Is similar to some latex stylings

* Remove unintended curly bracket

* Fix Bibliography function in typst not incrementing header `=`
  • Loading branch information
MadsLudvig authored Mar 1, 2024
1 parent 4ef046a commit e368e76
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion report-template/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,24 @@
set par(justify: true)
// Chapter Styling
show heading.where(level: 1): h => {
pagebreak(weak: true)
v(1em)
let c = luma(70)
set text(fill: c, size: 80pt)
place(left, counter(heading).display())
set text(fill: c, size: 20pt)
place(right, dy: 1.6em, {h.body})
place(right, dy: 2.7em, {line(length: 80%, stroke: 0.7pt + c)})
v(6em)
}
// Increment header for bibliography
show bibliography: body => {
counter(heading).step()
body
}
body
}
}

0 comments on commit e368e76

Please sign in to comment.