problem 1.2 b'
This commit is contained in:
38
utils/boxes.typ
Normal file
38
utils/boxes.typ
Normal file
@@ -0,0 +1,38 @@
|
||||
#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%)
|
||||
)
|
||||
28
utils/macros.typ
Normal file
28
utils/macros.typ
Normal file
@@ -0,0 +1,28 @@
|
||||
#import "@preview/fletcher:0.5.8" as fletcher
|
||||
|
||||
#let CRing = math.bold("CRing")
|
||||
#let Open = math.op("Open")
|
||||
#let Set = math.bold("Set")
|
||||
|
||||
|
||||
#let colim = math.limits(math.op("colim"))
|
||||
|
||||
#let cdiagram(..args) = {
|
||||
let named = args.named()
|
||||
// Если spacing не задан явно при вызове, берем дефолтный
|
||||
if "spacing" not in named {
|
||||
named.insert("spacing", (10mm, 7mm))
|
||||
}
|
||||
align(center, fletcher.diagram(..args.pos(), ..named))
|
||||
}
|
||||
|
||||
// Макрос для инлайн-диаграмм внутри формул
|
||||
#let inlinediag(..args) = box(
|
||||
baseline: 50%,
|
||||
fletcher.diagram(
|
||||
spacing: (4mm, 3.5mm),
|
||||
node-inset: 1pt,
|
||||
edge-stroke: 0.6pt,
|
||||
..args,
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user