Skip to content

Commit

Permalink
refactor: make the footer an acutal footer
Browse files Browse the repository at this point in the history
  • Loading branch information
johanvx committed May 14, 2024
1 parent e98a15a commit 455b0d0
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions undergradmath.typ
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
// Meta data
#set document(title: "Typst Math for Undergrads", author: "johanvx")

// Margin
#set page(margin: 0.5in)
// headcolor
#let headcolor = rgb("004225")

// Margin and footer
#set page(
margin: 0.5in,
footer: context {
if counter(page).display() == "2" {
grid(
columns: (1fr, 1fr),
[],
block(
inset: 4pt,
stroke: (top: headcolor),
text(headcolor)[johanvx (https://github.com/johanvx) #h(1fr) #datetime.today().display()]
)
)
} else {
[]
}
}
)

// Font size
#let scriptsize = 7pt
Expand Down Expand Up @@ -37,10 +57,7 @@
box(L + kern(-0.36em) + A + kern(-0.15em) + TeX)
})

// Update date
#let date = datetime.today().display()

// Unavailable (last check date)
// Unavailable (last check version)
#show "??": box(text(red, [v#sys.version #emoji.crossmark]))
// Tricky
#show "!!": box(text(blue, emoji.drops))
Expand All @@ -56,9 +73,6 @@
// Justified paragraphs
#set par(justify: true)

// headcolor
#let headcolor = rgb("004225")

// Run-in sections, like LaTeX \paragraph
#show heading.where(
level: 1
Expand Down Expand Up @@ -556,11 +570,3 @@ For permutations use $n^(underline(r))$ from `n^(underline(r))` (some authors us

= For more
See also the Typst Documentation at #link("https://typst.app/docs").

#v(1fr)

#block(
inset: 4pt,
stroke: (top: headcolor),
text(headcolor)[johanvx (https://github.com/johanvx) #h(1fr) #date]
)

0 comments on commit 455b0d0

Please sign in to comment.