wip content
This commit is contained in:
32
lib.typ
32
lib.typ
@@ -33,7 +33,35 @@
|
||||
}
|
||||
|
||||
|
||||
}#let note = callout.with(kind: "note", label: "Note:")
|
||||
#let note = callout.with(kind: "note", label: "Note:")
|
||||
#let warn = callout.with(kind: "warn", label: "Warning:")
|
||||
#let tip = callout.with(kind: "tip", label: "Tip:")
|
||||
#let todo = callout.with(kind: "todo", label: "TODO:")
|
||||
|
||||
// #let todo = callout.with(kind: "todo", label: "TODO:")
|
||||
#let todo(caption, ..args) = callout(kind: "todo", label: "TODO:", {
|
||||
show figure: none
|
||||
(
|
||||
caption,
|
||||
figure(kind: "todo", supplement: "TODO", caption: caption, none),
|
||||
..args.pos(),
|
||||
).join(parbreak())
|
||||
})
|
||||
|
||||
|
||||
#let example = callout.with(kind: "eg", label: "For example:")
|
||||
|
||||
#let details(body, label: "Details") = {
|
||||
context if target() == "html" {
|
||||
html.details({
|
||||
html.summary(strong[Click for #label])
|
||||
body
|
||||
})
|
||||
} else {
|
||||
[
|
||||
#strong(label):
|
||||
#body
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
#let solution = details.with(label: "Solution")
|
||||
|
||||
Reference in New Issue
Block a user