Added instructornote
and if_solutions_else
This commit is contained in:
parent
0083843417
commit
c97bea7443
@ -4,6 +4,13 @@
|
|||||||
// All functions that maybe used by client code are listed here
|
// All functions that maybe used by client code are listed here
|
||||||
#import "misc.typ": *
|
#import "misc.typ": *
|
||||||
#import "object.typ": problem, definition, theorem, example, remark, generic
|
#import "object.typ": problem, definition, theorem, example, remark, generic
|
||||||
|
#import "solution.typ": (
|
||||||
|
if_solutions,
|
||||||
|
if_no_solutions,
|
||||||
|
if_solutions_else,
|
||||||
|
solution,
|
||||||
|
instructornote,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
/// Main handout wrapper.
|
/// Main handout wrapper.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#import "misc.typ": ored
|
#import "misc.typ": ored, oblue
|
||||||
|
|
||||||
/// If false, hide instructor info.
|
/// If false, hide instructor info.
|
||||||
///
|
///
|
||||||
@ -27,6 +27,10 @@
|
|||||||
if not show_solutions { content }
|
if not show_solutions { content }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#let if_solutions_else(if_yes, if_no) = {
|
||||||
|
if show_solutions { if_yes } else { if_no }
|
||||||
|
}
|
||||||
|
|
||||||
#let solution(content) = {
|
#let solution(content) = {
|
||||||
if_solutions(
|
if_solutions(
|
||||||
align(
|
align(
|
||||||
@ -54,3 +58,31 @@
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#let instructornote(content) = {
|
||||||
|
if_solutions(
|
||||||
|
align(
|
||||||
|
center,
|
||||||
|
stack(
|
||||||
|
block(
|
||||||
|
width: 100%,
|
||||||
|
breakable: false,
|
||||||
|
fill: oblue,
|
||||||
|
stroke: oblue + 2pt,
|
||||||
|
inset: 1.5mm,
|
||||||
|
align(left, text(fill: white, weight: "bold", [Instructor note:])),
|
||||||
|
),
|
||||||
|
|
||||||
|
block(
|
||||||
|
width: 100%,
|
||||||
|
height: auto,
|
||||||
|
breakable: false,
|
||||||
|
fill: oblue.lighten(80%).desaturate(10%),
|
||||||
|
stroke: oblue + 2pt,
|
||||||
|
inset: 3mm,
|
||||||
|
align(left, content),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user