39 lines
697 B
Typst
39 lines
697 B
Typst
#let infobox(
|
|
body,
|
|
title: none,
|
|
stroke-color: black,
|
|
fill-color: luma(245),
|
|
border-width: 1pt,
|
|
radius: 4pt,
|
|
padding: 8pt,
|
|
) = {
|
|
block(
|
|
width: 100%,
|
|
stroke: (paint: stroke-color, thickness: border-width),
|
|
fill: fill-color,
|
|
radius: radius,
|
|
inset: padding,
|
|
)[
|
|
#if title != none [
|
|
*#title*\
|
|
]
|
|
#body
|
|
]
|
|
}
|
|
|
|
#let problembox(body, title: none) = infobox(
|
|
body,
|
|
title: title,
|
|
fill-color: aqua.transparentize(80%)
|
|
)
|
|
|
|
#let answerbox(body, title: none) = infobox(
|
|
body,title: title, fill-color: red.transparentize(80%)
|
|
)
|
|
|
|
#let addinfobox(body, title: none) = infobox(
|
|
body,
|
|
title: title,
|
|
fill-color: rgb("#FFB3BF").transparentize(80%)
|
|
)
|