Skip to content
Snippets Groups Projects
Verified Commit 568e4a8d authored by Sophie Krause's avatar Sophie Krause :rabbit2:
Browse files

use hydra for heading, cleanup docs template

parent 588dea49
Branches
No related tags found
No related merge requests found
Pipeline #1832 passed
...@@ -14,5 +14,8 @@ ...@@ -14,5 +14,8 @@
#pagebreak() #pagebreak()
#lorem(100)
#pagebreak()
= Fazit = Fazit
#lorem(100) #lorem(100)
\ No newline at end of file
// The project function defines how your document looks. #import "@preview/hydra:0.6.0": hydra
// It takes your content and some metadata and formats it.
// Go ahead and customize it to your liking!
#let project(title: "", subtitle: "", authors: (), logo: none, body) = { #let project(title: "", subtitle: "", authors: (), logo: none, body) = {
// Set the document's basic properties. // Set the document's basic properties.
...@@ -42,54 +41,19 @@ ...@@ -42,54 +41,19 @@
set page(numbering: "I", number-align: center) set page(numbering: "I", number-align: center)
// Table of contents
outline(depth: 3)
pagebreak()
/*let ht-first = state("page-first-section", []) let show-header(ctx, candidates) = {
let ht-last = state("page-last-section", []) candidates.body
set page(
header: {
locate(loc => {
// find first heading of level 1 on current page
let first-heading = query(
heading.where(level: 1), loc)
.find(h => h.location().page() == loc.page())
// find last heading of level 1 on current page
let last-heading = query(
heading.where(level: 1), loc)
.rev()
.find(h => h.location().page() == loc.page())
// test if the find function returned none (i.e. no headings on this page)
{
if not first-heading == none {
ht-first.update([
// change style here if update needed section per section
#first-heading.body
])
ht-last.update([
// change style here if update needed section per section
#last-heading.body
])
// if one or more headings on the page, use first heading
// change style here if update needed page per page
ht-first.display()
} else {
// no headings on the page, use last heading from variable
// change style here if update needed page per page
ht-last.display()
}
}
}
)
v(-0.8em) v(-0.8em)
line(length: 100%, stroke: 0.5pt) line(length: 100%, stroke: 0.5pt)
} }
)*/
// Table of contents set page(header: context {
outline(depth: 3) hydra(1, skip-starting: false, display: show-header)
pagebreak() })
set page(numbering: "1") set page(numbering: "1")
counter(page).update(1) counter(page).update(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment