Skip to content

Commit

Permalink
feat(typst): More gentle clues
Browse files Browse the repository at this point in the history
  • Loading branch information
vEnhance committed Oct 8, 2024
1 parent 884615c commit 91d62cb
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions typst/packages/local/evan/1.0.0/evan.typ
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
set math.equation(numbering: "(1)")
s
}
#let pageref(label) = context {
let loc = locate(label)
let nums = counter(page).at(loc)
link(loc, "page " + numbering(loc.page-numbering(), ..nums))
}

// Define clue environments
#let definition(..args) = clue(
Expand All @@ -43,7 +48,7 @@
#let problem(..args) = clue(
accent-color: get-accent-color-for("experiment"),
icon: get-icon-for("experiment"),
title: "",
title: "Problem",
..args
)
#let soln(..args) = clue(
Expand All @@ -64,7 +69,18 @@
title: "Recipe",
..args
)

#let typesig(..args) = clue(
accent-color: get-accent-color-for("code"),
icon: get-icon-for("code"),
title: "Type signature",
..args
)
#let digression(..args) = clue(
accent-color: rgb("#bbbbbb"),
icon: get-icon-for("quote"),
title: "Digression",
..args
)

// Theorem environments
#let thm = thmbox("main", "Theorem", fill: rgb("#eeeeff"), base_level: 1)
Expand Down

0 comments on commit 91d62cb

Please sign in to comment.